How to fix collect2.exe: error: ld returned 1 exit status exit status 1 Compilation error: exit status 1


Hi @ahmed45. I'm going to ask you to provide the full verbose output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  7. Open a forum reply here by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  9. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.


FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\benes\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\benes\AppData\Local\Temp\arduino\sketches\B881D82C902A44610FD04BE0FAC3704B\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\benes\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\benes\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\benes\AppData\Local\Temp\arduino\sketches\B881D82C902A44610FD04BE0FAC3704B\sketch\Blink.ino.cpp -o C:\Users\benes\AppData\Local\Temp\3557835385\sketch_merged.cpp
C:\Users\benes\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\benes\AppData\Local\Temp\3557835385\sketch_merged.cpp
Compilation du croquis...
"C:\\Users\\benes\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\benes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\benes\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B\\sketch\\Blink.ino.cpp" -o "C:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\benes\AppData\Local\Temp\arduino\cores\arduino_avr_uno_28e92046398b1b88c621452f87b80bc4\core.a
Linking everything together...
"C:\\Users\\benes\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B/Blink.ino.elf" "C:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B\\sketch\\Blink.ino.cpp.o" "C:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B/..\\..\\cores\\arduino_avr_uno_28e92046398b1b88c621452f87b80bc4\\core.a" "-LC:\\Users\\benes\\AppData\\Local\\Temp\\arduino\\sketches\\B881D82C902A44610FD04BE0FAC3704B" -lm
c:/users/benes/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

The error you are encountering might be caused by the core cache having been corrupted. If so, the solution will be to delete the cache. This will force Arduino IDE to automatically generate a fresh cache.

You can do that by deleting the folder at the following path on your hard drive:

C:\Users\benes\AppData\Local\Temp\arduino\cores\arduino_avr_uno_28e92046398b1b88c621452f87b80bc4

:exclamation: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".


:warning: Please be careful when deleting things from your computer. When in doubt, back up!


Additional Information

In case you are interested in learning more about this subject, I'll provide the boring details below. If you aren't curious then you are welcome to skip reading the rest of the post.

The standard API (e.g., digitalWrite, delay) we use when writing Arduino sketches is implemented in what is known as a "core". You can think of this as a special library that is always available for use in your sketch.

The code of the core is compiled as part of your sketch program. The first time you compile a sketch for a given board, Arduino IDE automatically saves the objects that were generated when compiling the core.

If that cached precompiled core is already present, Arduino IDE will use it during subsequent compilations of sketches for that board rather than compiling the core from the source code. The core cache is only regenerated if the core's source code has changed (e.g., if you used Boards Manager to update the boards platform or manually modified the core code).

This caching is done to reduce the time it takes to compile a sketch, since the core has a lot of code and thus takes quite a bit of time to compile.

thank you for your help

You are welcome. I'm glad if I was able to be of assistance.

Regards,
Per

2 posts were split to a new topic: Compilation fails: "undefined reference to loop'"

A post was split to a new topic: Collect2.exe: error: ld returned 1 exit status

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\mrafi\AppData\Local\arduino\sketches\9DD9661AEB5919C411E45FB7BB179126\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\mrafi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\mrafi\AppData\Local\arduino\sketches\9DD9661AEB5919C411E45FB7BB179126\sketch\Blink.ino.cpp -o C:\Users\mrafi\AppData\Local\Temp\1450294368\sketch_merged.cpp
C:\Users\mrafi\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\mrafi\AppData\Local\Temp\1450294368\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\mrafi\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\mrafi\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\mrafi\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126\\sketch\\Blink.ino.cpp" -o "C:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\mrafi\AppData\Local\arduino\cores\arduino_avr_uno_f80861bd965d3314e67e2d8d43a63c43\core.a
Linking everything together...
"C:\\Users\\mrafi\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126/Blink.ino.elf" "C:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126\\sketch\\Blink.ino.cpp.o" "C:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126/..\\..\\cores\\arduino_avr_uno_f80861bd965d3314e67e2d8d43a63c43\\core.a" "-LC:\\Users\\mrafi\\AppData\\Local\\arduino\\sketches\\9DD9661AEB5919C411E45FB7BB179126" -lm
c:/users/mrafi/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

google for "arduino undefined reference to `main' " or see the suggestion earlier in this thread. It is probably a corruption problem. You could also try renaming your sketch so the old cached code is not used.

FQBN: esp32:esp32:esp32doit-devkit-v1
Using board 'esp32doit-devkit-v1' from platform in folder: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0
Using core 'esp32' from platform in folder: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0

cmd /c if exist "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\partitions.csv" COPY /y "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\partitions.csv" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\partitions.csv"
cmd /c if not exist "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\partitions.csv" if exist "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\variants\\doitESP32devkitV1\\partitions.csv" COPY "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\variants\\doitESP32devkitV1\\partitions.csv" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\partitions.csv"
cmd /c if not exist "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\partitions.csv" COPY "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\tools\\partitions\\default.csv" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\partitions.csv"
cmd /c IF EXIST "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\bootloader.bin" ( COPY /y "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\bootloader.bin" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\WiFiScanTime.ino.bootloader.bin" ) ELSE ( IF EXIST "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\variants\\doitESP32devkitV1\\bootloader.bin" ( COPY "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\variants\\doitESP32devkitV1\\bootloader.bin" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\WiFiScanTime.ino.bootloader.bin" ) ELSE ( "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.9.dev3\\esptool.exe" --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\WiFiScanTime.ino.bootloader.bin" "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32\\bin\\bootloader_dio_80m.elf" ) )
esptool.py v4.8.1
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
cmd /c if exist "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\build_opt.h" COPY /y "C:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime\\build_opt.h" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\build_opt.h"
cmd /c if not exist "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\build_opt.h" type nul > "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\build_opt.h"
cmd /c type nul > "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/file_opts"
cmd /c COPY /y "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32\\sdkconfig" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\sdkconfig"
        1 file(s) copied.
Detecting libraries used...
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2411/bin/xtensa-esp32-elf-g++ -c @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/defines -IC:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime -iprefix C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/includes -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/dio_qspi/include -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\variants\doitESP32devkitV1 @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/build_opt.h @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/file_opts C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp -o nul
Alternatives for WiFi.h: [WiFi@3.2.0]
ResolveLibrary(WiFi.h)
  -> candidates: [WiFi@3.2.0]
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2411/bin/xtensa-esp32-elf-g++ -c @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/defines -IC:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime -iprefix C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/includes -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/dio_qspi/include -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\variants\doitESP32devkitV1 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/build_opt.h @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/file_opts C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp -o nul
Alternatives for Network.h: [Networking@3.2.0]
ResolveLibrary(Network.h)
  -> candidates: [Networking@3.2.0]
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2411/bin/xtensa-esp32-elf-g++ -c @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/defines -IC:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime -iprefix C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/includes -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/dio_qspi/include -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\variants\doitESP32devkitV1 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/build_opt.h @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/file_opts C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp -o nul
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\AP.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\STA.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFi.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFiAP.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFiGeneric.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFiMulti.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFiSTA.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src\WiFiScan.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkClient.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkEvents.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkInterface.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkManager.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkServer.cpp
Using cached library dependencies for file: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src\NetworkUdp.cpp
Generating function prototypes...
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp-x32\2411/bin/xtensa-esp32-elf-g++ -c @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="windows" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/defines -IC:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime -iprefix C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/include/ @C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/flags/includes -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/dio_qspi/include -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\variants\doitESP32devkitV1 -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src -IC:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/build_opt.h @C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C/file_opts C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp -o C:\Users\LENOVO\AppData\Local\Temp\728952761\sketch_merged.cpp
C:\Users\LENOVO\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\LENOVO\AppData\Local\Temp\728952761\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2411/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/cpp_flags" -w -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_DEV\"" "-DARDUINO_VARIANT=\"doitESP32devkitV1\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none\"" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/defines" "-IC:\\Users\\LENOVO\\AppData\\Local\\Temp\\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\\WiFiScanTime" -iprefix "C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/include/" "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/includes" "-IC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/dio_qspi/include" "-IC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\cores\\esp32" "-IC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\variants\\doitESP32devkitV1" "-IC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\libraries\\WiFi\\src" "-IC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.2.0\\libraries\\Network\\src" "@C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/build_opt.h" "@C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/file_opts" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\sketch\\WiFiScanTime.ino.cpp" -o "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\sketch\\WiFiScanTime.ino.cpp.o"
Compiling libraries...
Compiling library "WiFi"
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiMulti.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiScan.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\AP.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\STA.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiAP.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiSTA.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFi.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiGeneric.cpp.o
Compiling library "Networking"
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkUdp.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkServer.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkInterface.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkClient.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkEvents.cpp.o
Using previously compiled file: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkManager.cpp.o
Compiling core...
cmd /c echo -DARDUINO_CORE_BUILD > "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/file_opts"
Using precompiled core: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a
cmd /c type nul > "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/file_opts"
Linking everything together...
"C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2411/bin/xtensa-esp32-elf-g++" "-Wl,--Map=C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/WiFiScanTime.ino.map" "-LC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/lib" "-LC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/ld" "-LC:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/dio_qspi" -Wl,--wrap=esp_panic_handler "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/ld_flags" "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/ld_scripts" -Wl,--start-group "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\sketch\\WiFiScanTime.ino.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\AP.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\STA.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFi.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFiAP.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFiGeneric.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFiMulti.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFiSTA.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\WiFi\\WiFiScan.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkClient.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkEvents.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkInterface.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkManager.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkServer.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C\\libraries\\Network\\NetworkUdp.cpp.o" "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\cores\\e28d057b1ed949a5224c615e4d7603a8\\core.a" "@C:\\Users\\LENOVO\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.4-2f7dcd86-v1\\esp32/flags/ld_libs" -Wl,--end-group -Wl,-EL -o "C:\\Users\\LENOVO\\AppData\\Local\\arduino\\sketches\\22F044893C06539E8EBD77AEC100B92C/WiFiScanTime.ino.elf"
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/lib\libesp_system.a(panic_handler.c.obj):(.literal.panic_handler+0x3c): undefined reference to `__wrap_esp_panic_handler'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/lib\libesp_system.a(panic_handler.c.obj): in function `frame_to_panic_info':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/port/panic_handler.c:113:(.text.panic_handler+0x147): undefined reference to `__wrap_esp_panic_handler'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\STA.cpp.o: in function `STAClass::disconnect(bool, unsigned long)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src/STA.cpp:547:(.text._ZN8STAClass10disconnectEbm+0x64): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src/STA.cpp:554:(.text._ZN8STAClass10disconnectEbm+0x76): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src/STA.cpp:555:(.text._ZN8STAClass10disconnectEbm+0x84): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiScan.cpp.o:(.literal._ZN13WiFiScanClass4SSIDEh+0x4): undefined reference to `String::String(char const*)'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiScan.cpp.o: in function `WiFiScanClass::scanNetworks(bool, bool, bool, unsigned long, unsigned char, char const*, unsigned char const*)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src/WiFiScan.cpp:89:(.text._ZN13WiFiScanClass12scanNetworksEbbbmhPKcPKh+0x71): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\WiFi\WiFiScan.cpp.o: in function `WiFiScanClass::SSID(unsigned char)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi\src/WiFiScan.cpp:103:(.text._ZN13WiFiScanClass4SSIDEh+0x12): undefined reference to `String::String(char const*)'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp.o:(.literal._Z8wifiScantt+0x60): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp.o:(.literal._Z8wifiScantt+0x64): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp.o:(.literal._Z8wifiScantt+0x68): undefined reference to `String::~String()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp.o: in function `wifiScan(unsigned short, unsigned short)':
C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:25:(.text._Z8wifiScantt+0x34): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:30:(.text._Z8wifiScantt+0x56): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:69:(.text._Z8wifiScantt+0x90): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:41:(.text._Z8wifiScantt+0x127): undefined reference to `String::~String()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:60:(.text._Z8wifiScantt+0x1bb): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:41:(.text._Z8wifiScantt+0x1eb): undefined reference to `String::~String()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\sketch\WiFiScanTime.ino.cpp.o: in function `setup()':
C:\Users\LENOVO\AppData\Local\Temp\.arduinoIDE-unsaved2025425-22796-1sd8ejv.yd51\WiFiScanTime/WiFiScanTime.ino:77:(.text._Z5setupv+0x3c): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkInterface.cpp.o: in function `NetworkInterface::macAddress() const':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src/NetworkInterface.cpp:651:(.text._ZNK16NetworkInterface10macAddressEv+0x55): undefined reference to `String::String(char const*)'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkInterface.cpp.o: in function `NetworkInterface::printTo(Print&) const':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src/NetworkInterface.cpp:826:(.text._ZNK16NetworkInterface7printToER5Print+0x19e): undefined reference to `String::~String()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src/NetworkInterface.cpp:826:(.text._ZNK16NetworkInterface7printToER5Print+0x396): undefined reference to `String::~String()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial14_uartEventTaskEPv+0x0): undefined reference to `uartGetEventQueue'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial9availableEv+0x0): undefined reference to `uartAvailable'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial17availableForWriteEv+0x0): undefined reference to `uartAvailableForWrite'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial4peekEv+0x0): undefined reference to `uartPeek'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial4readEv+0x0): undefined reference to `uartReadBytes'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5flushEv+0x0): undefined reference to `uartFlush'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5writeEh+0x0): undefined reference to `uartWrite'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5writeEPKhj+0x0): undefined reference to `uartWriteBuf'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerialC2Eh+0x4): undefined reference to `uart_init_PeriMan'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x0): undefined reference to `uart_get_RxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x4): undefined reference to `uart_get_TxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x8): undefined reference to `uartIsDriverInstalled'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0xc): undefined reference to `_testUartBegin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x10): undefined reference to `uartBegin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x14): undefined reference to `uartStartDetectBaudrate'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x18): undefined reference to `uartDetectBaudrate'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x1c): undefined reference to `yield'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x20): undefined reference to `uartSetRxTimeout'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial5beginEmmaabmh+0x24): undefined reference to `uartSetRxFIFOFull'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial3endEv+0x0): undefined reference to `uartGetDebug'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial3endEv+0x4): undefined reference to `uartSetDebug'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.literal._ZN14HardwareSerial3endEv+0x8): undefined reference to `uartEnd'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::_uartEventTask(void*)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:262:(.text._ZN14HardwareSerial14_uartEventTaskEPv+0xf): undefined reference to `uartGetEventQueue'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::available()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:517:(.text._ZN14HardwareSerial9availableEv+0x6): undefined reference to `uartAvailable'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::availableForWrite()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:520:(.text._ZN14HardwareSerial17availableForWriteEv+0x6): undefined reference to `uartAvailableForWrite'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::peek()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:525:(.text._ZN14HardwareSerial4peekEv+0x14): undefined reference to `uartPeek'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::read()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:532:(.text._ZN14HardwareSerial4readEv+0x12): undefined reference to `uartReadBytes'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::readBytes(unsigned char*, unsigned int)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:549:(.text._ZN14HardwareSerial9readBytesEPhj+0xb): undefined reference to `uartReadBytes'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::flush()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:553:(.text._ZN14HardwareSerial5flushEv+0x6): undefined reference to `uartFlush'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::write(unsigned char)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:561:(.text._ZN14HardwareSerial5writeEh+0x8): undefined reference to `uartWrite'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::write(unsigned char const*, unsigned int)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:566:(.text._ZN14HardwareSerial5writeEPKhj+0xa): undefined reference to `uartWriteBuf'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::HardwareSerial(unsigned char)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:140:(.text._ZN14HardwareSerialC2Eh+0x5a): undefined reference to `uart_init_PeriMan'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::_createEventTask(void*)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:154:(.text._ZN14HardwareSerial16_createEventTaskEPv+0x1a): undefined reference to `xTaskCreateUniversal'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::begin(unsigned long, unsigned long, signed char, signed char, bool, unsigned long, unsigned char)':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:323:(.text._ZN14HardwareSerial5beginEmmaabmh+0x23): undefined reference to `uart_get_RxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:324:(.text._ZN14HardwareSerial5beginEmmaabmh+0x2f): undefined reference to `uart_get_TxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:329:(.text._ZN14HardwareSerial5beginEmmaabmh+0x50): undefined reference to `uartIsDriverInstalled'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:333:(.text._ZN14HardwareSerial5beginEmmaabmh+0x63): undefined reference to `uart_get_RxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:333:(.text._ZN14HardwareSerial5beginEmmaabmh+0x6e): undefined reference to `uart_get_TxPin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:418:(.text._ZN14HardwareSerial5beginEmmaabmh+0x113): undefined reference to `_testUartBegin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:424:(.text._ZN14HardwareSerial5beginEmmaabmh+0x138): undefined reference to `uartBegin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:425:(.text._ZN14HardwareSerial5beginEmmaabmh+0x146): undefined reference to `uartStartDetectBaudrate'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:432:(.text._ZN14HardwareSerial5beginEmmaabmh+0x14c): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:433:(.text._ZN14HardwareSerial5beginEmmaabmh+0x154): undefined reference to `millis'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:435:(.text._ZN14HardwareSerial5beginEmmaabmh+0x17a): undefined reference to `uartDetectBaudrate'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:435:(.text._ZN14HardwareSerial5beginEmmaabmh+0x182): undefined reference to `yield'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:436:(.text._ZN14HardwareSerial5beginEmmaabmh+0x192): undefined reference to `delay'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:441:(.text._ZN14HardwareSerial5beginEmmaabmh+0x1af): undefined reference to `uartBegin'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:455:(.text._ZN14HardwareSerial5beginEmmaabmh+0x1d6): undefined reference to `uartSetRxTimeout'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:467:(.text._ZN14HardwareSerial5beginEmmaabmh+0x20a): undefined reference to `uartSetRxFIFOFull'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o): in function `HardwareSerial::end()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:488:(.text._ZN14HardwareSerial3endEv+0x2c): undefined reference to `uartGetDebug'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:489:(.text._ZN14HardwareSerial3endEv+0x3a): undefined reference to `uartSetDebug'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\cores\esp32/HardwareSerial.cpp:492:(.text._ZN14HardwareSerial3endEv+0x48): undefined reference to `uartEnd'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8\core.a(HardwareSerial.cpp.o):(.rodata._ZTV14HardwareSerial[_ZTV14HardwareSerial]+0x34): undefined reference to `Stream::readString()'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/lib\libfreertos.a(app_startup.c.obj):(.literal.main_task+0x24): undefined reference to `app_main'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32/lib\libfreertos.a(app_startup.c.obj): in function `main_task':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/app_startup.c:199:(.text.main_task+0x6a): undefined reference to `app_main'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkEvents.cpp.o:(.literal._ZN13NetworkEvents17initNetworkEventsEv+0x10): undefined reference to `xTaskCreateUniversal'
C:/Users/LENOVO/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\LENOVO\AppData\Local\arduino\sketches\22F044893C06539E8EBD77AEC100B92C\libraries\Network\NetworkEvents.cpp.o: in function `NetworkEvents::initNetworkEvents()':
C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network\src/NetworkEvents.cpp:64:(.text._ZN13NetworkEvents17initNetworkEventsEv+0x56): undefined reference to `xTaskCreateUniversal'
collect2.exe: error: ld returned 1 exit status
Using library WiFi at version 3.2.0 in folder: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\WiFi 
Using library Networking at version 3.2.0 in folder: C:\Users\LENOVO\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.2.0\libraries\Network 
exit status 1

Compilation error: exit status 1

Hi @ahmed45. Please delete the folder at this location on your hard drive:

C:\Users\LENOVO\AppData\Local\arduino\cores\e28d057b1ed949a5224c615e4d7603a8

:red_exclamation_mark: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".


:warning: Please be careful when deleting things from your computer. When in doubt, back up!


After deleting that folder, try compiling your sketch again. Hopefully this time it will be successful.


For an explanation of the reasons for deleting this folder, see post #4.

Using board 'uno' from platform in folder: C:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\green multi pc\AppData\Local\arduino\sketches\5F69A1802F900695925BA6DAABB14AFB\sketch\sketch_jul23b.ino.cpp -o nul
Generating function prototypes...
C:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\green multi pc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\green multi pc\AppData\Local\arduino\sketches\5F69A1802F900695925BA6DAABB14AFB\sketch\sketch_jul23b.ino.cpp -o C:\Users\green multi pc\AppData\Local\Temp\2472529424\sketch_merged.cpp
C:\Users\green multi pc\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\green multi pc\AppData\Local\Temp\2472529424\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\green multi pc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\green multi pc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\green multi pc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB\\sketch\\sketch_jul23b.ino.cpp" -o "C:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB\\sketch\\sketch_jul23b.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\green multi pc\AppData\Local\arduino\cores\arduino_avr_uno_b876a988bdf6a3e4f67a174d45e42f39\core.a
Linking everything together...
"C:\\Users\\green multi pc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB/sketch_jul23b.ino.elf" "C:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB\\sketch\\sketch_jul23b.ino.cpp.o" "C:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB/..\\..\\cores\\arduino_avr_uno_b876a988bdf6a3e4f67a174d45e42f39\\core.a" "-LC:\\Users\\green multi pc\\AppData\\Local\\arduino\\sketches\\5F69A1802F900695925BA6DAABB14AFB" -lm
c:/users/green multi pc/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
exit status 1

Compilation error: exit status 1

type or paste code here

Hi @jatin_yadav123. The error you are encountering might be caused by the core cache having been corrupted. If so, the solution will be to force Arduino IDE to generate a fresh cache.

This can be accomplished by reinstalling the "Arduino AVR Boards" platform.

I'll provide instructions you can follow to do that:

  1. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Find the "Arduino AVR Boards" entry in the list of boards platforms.
  3. Hover the mouse pointer over the "Arduino AVR Boards" entry.
    You will see a ●●● icon appear at the top right corner of the entry.
  4. Click the ●●● icon.
    A menu will open.
  5. Select "Remove" from the menu.
    An "Uninstall" dialog will open.
  6. Click the "YES" button in the "Uninstall" dialog.
    The dialog will close.
  7. Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully uninstalled platform ...

  8. Click the "INSTALL" button at the bottom of the "Arduino AVR Boards" entry.
  9. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

Now try compiling your sketch again. Hopefully this time it will be successful.

Additional Information

In case you are interested in learning more about this subject, I'll provide the boring details below. If you aren't curious then you are welcome to skip reading the rest of the post.

The standard API (e.g., digitalWrite, delay) we use when writing Arduino sketches is implemented in what is known as a "core". You can think of this as a special library that is always available for use in your sketch. The main function referenced in that "undefined reference to `main'" error message is defined in the core.

The code of the core is compiled as part of your sketch program. The first time you compile a sketch for a given board, Arduino IDE automatically saves ("caches") the objects that were generated when compiling the core for later use.

If that cached precompiled core is already present, Arduino IDE will use it during subsequent compilations of sketches for that board rather than compiling the core from the source code. The core cache is only regenerated if the core's source code has changed (e.g., if you used Boards Manager to update the boards platform or manually modified the core code).

This caching is done to reduce the time it takes to compile a sketch, since the core has a lot of code and thus takes quite a bit of time to compile.

The reinstallation of the boards platform changes the timestamps on the core files, which makes Arduino IDE think the source code might have changed and so it automatically regenerates the core cache.

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\emmaz\AppData\Local\arduino\sketches\D3759EF7A657497F0B6A9A4586863FFB\sketch\test.ino.cpp -o nul
Generating function prototypes...
C:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\emmaz\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard C:\Users\emmaz\AppData\Local\arduino\sketches\D3759EF7A657497F0B6A9A4586863FFB\sketch\test.ino.cpp -o C:\Users\emmaz\AppData\Local\Temp\2155315610\sketch_merged.cpp
C:\Users\emmaz\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\emmaz\AppData\Local\Temp\2155315610\sketch_merged.cpp

Compiling sketch...
"C:\\Users\\emmaz\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\emmaz\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\emmaz\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB\\sketch\\test.ino.cpp" -o "C:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB\\sketch\\test.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\emmaz\AppData\Local\arduino\cores\arduino_avr_uno_146995c481052024604f2fc0aeff5cdf\core.a
Linking everything together...
"C:\\Users\\emmaz\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB/test.ino.elf" "C:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB\\sketch\\test.ino.cpp.o" "C:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB/..\\..\\cores\\arduino_avr_uno_146995c481052024604f2fc0aeff5cdf\\core.a" "-LC:\\Users\\emmaz\\AppData\\Local\\arduino\\sketches\\D3759EF7A657497F0B6A9A4586863FFB" -lm
C:\Users\emmaz\AppData\Local\Temp\ccDseMtX.ltrans0.ltrans.o:(.rodata+0x6): undefined reference to `Print::write(unsigned char const*, unsigned int)'
c:/users/emmaz/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
exit status 1

Compilation error: exit status 1

@skdjf

If this is the first time that you compile for an AVR based board (Uno, Mega, Nano) it would indicate that the installation of the board package is corrupt. In that case I suggest that you use the board manager to downgrade the AVR board package, test and next upgrade again.

If you could compile in the past, the cache is corrupt and you can clear it. The cache is located in the directory C:\Users\emaz\AppData\Local\arduino and contains two directories; you can delete both directories (I always do) although it should be sufficient to delete the cores directory. After that you can compile again and check if compilation succeeds.

Note that the content of the AppData directory is hidden by default on Windows system; you can make it visible using the options in the file explorer.