fdivitto / FabGL

ESP32 Display Controller (VGA, PAL/NTSC Color Composite, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal
http://www.fabglib.org
Other
1.39k stars 204 forks source link

PC Emulator error when compiling code for TTGO #378

Open JuniorFilho1001 opened 3 months ago

JuniorFilho1001 commented 3 months ago

When trying to compile the PC Emulator code, I come across this bunch of errors:

In file included from C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:27: C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.h: In constructor 'Machine::Machine()': C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.h:181:44: error: 'Machine::m_disk' will be initialized after [-Werror=reorder] FILE * m_disk[DISKCOUNT]; ^ C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.h:180:51: error: 'bool Machine::m_diskChanged [4]' [-Werror=reorder] bool m_diskChanged[DISKCOUNT]; ^ C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:98:1: error: when initialized here [-Werror=reorder] Machine::Machine() : ^~~ C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp: In member function 'void Machine::setCGA6845Register(uint8_t)': C:\Users\tapeg\AppData\Local\Temp.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:374:41: warning: this statement may fall through [-Wimplicit-fallthrough=] m_graphicsAdapter.setCursorVisible((m_CGA6845[0xa] >> 5) >= 2);


C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:377:5: note: here
     case 0x0b:
     ^~~~
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp: In member function 'void Machine::setHGC6845Register(uint8_t)':
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:462:41: warning: this statement may fall through [-Wimplicit-fallthrough=]
       m_graphicsAdapter.setCursorVisible((m_HGC6845[0xa] >> 5) >= 2);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\machine.cpp:464:5: note: here
     case 0x0b:
     ^~~~
cc1plus.exe: some warnings being treated as errors
In file included from C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:44:
C:\Users\tapeg\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11/tools/sdk/esp32/include/esp_hw_support/include/soc/esp_spiram.h:1:2: warning: #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead [-Wcpp]
 #warning esp_spiram.h has been replaced by esp32/spiram.h, please include esp32/spiram.h instead
  ^~~~~~~
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:37:17: note: #pragma message: This sketch requires Tools->Partition Scheme = Huge APP
 #pragma message "This sketch requires Tools->Partition Scheme = Huge APP"
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino: In function 'void updateDateTime()':
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:222:113: warning: missing initializer for member 'tm::tm_wday' [-Wmissing-field-initializers]
     auto tm = (struct tm){ .tm_sec  = 0, .tm_min  = 0, .tm_hour = 8, .tm_mday = 14, .tm_mon  = 7, .tm_year = 84 };
                                                                                                                 ^
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:222:113: warning: missing initializer for member 'tm::tm_yday' [-Wmissing-field-initializers]
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:222:113: warning: missing initializer for member 'tm::tm_isdst' [-Wmissing-field-initializers]
C:\Users\tapeg\AppData\Local\Temp\.arduinoIDE-unsaved2024216-7412-lawcjw.zwokr\PCEmulator\PCEmulator.ino:223:49: warning: missing initializer for member 'timeval::tv_usec' [-Wmissing-field-initializers]
     auto now = (timeval){ .tv_sec = mktime(&tm) };
                                                 ^
JuniorFilho1001 commented 3 months ago

problem solved. I reinstalled the Arduino IDE and it worked normally.