GET AN ERROR WHILE UPLOADING SKETCH. (Windows 10, IDE 1.8.10)

GET AN ERROR WHILE UPLOADING SKETCH

Arduino:1.8.10 (Windows 10), Board:"Arduino Nano, ATmega328P"

d:/arduino/hardware/tools/avr/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
Fout bij het compileren voor board Arduino Nano

Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
optie aan in Bestand -> Voorkeuren.

EXPANDED ERROR

Arduino:1.8.10 (Windows 10), Board:"Arduino Nano, ATmega328P"

D:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -built-in-libraries D:\Arduino\libraries -libraries D:\Eigenaar\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10810 -build-path C:\Users\Eigenaar\AppData\Local\Temp\arduino_build_383311 -warnings=none -build-cache C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=D:\Arduino\hardware\tools\avr -verbose E:\LEDs_Via_PC\LEDs_Via_PC.ino
D:\Arduino\arduino-builder -compile -logger=machine -hardware D:\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -built-in-libraries D:\Arduino\libraries -libraries D:\Eigenaar\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10810 -build-path C:\Users\Eigenaar\AppData\Local\Temp\arduino_build_383311 -warnings=none -build-cache C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=D:\Arduino\hardware\tools\avr -verbose E:\LEDs_Via_PC\LEDs_Via_PC.ino
Using board 'nano' from platform in folder: D:\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: D:\Arduino\hardware\arduino\avr
Detecting libraries used...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o nul
Generating function prototypes...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"D:\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch aan het compileren...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183\core\core_arduino_avr_nano_cpu_atmega328_fd040c28ca717db04400ddff4ecd4334.a
Linking everything together...
"D:\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311/LEDs_Via_PC.ino.elf" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp.o" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311/..\\arduino_cache_217183\\core\\core_arduino_avr_nano_cpu_atmega328_fd040c28ca717db04400ddff4ecd4334.a" "-LC:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311" -lm
d:/arduino/hardware/tools/avr/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
Fout bij het compileren voor board Arduino Nano

Keep getting Errors while compiling my sketch tot my arduino nano

Arduino:1.8.10 (Windows 10), Board:"Arduino Nano, ATmega328P"

D:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -built-in-libraries D:\Arduino\libraries -libraries D:\Eigenaar\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10810 -build-path C:\Users\Eigenaar\AppData\Local\Temp\arduino_build_383311 -warnings=none -build-cache C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=D:\Arduino\hardware\tools\avr -verbose E:\LEDs_Via_PC\LEDs_Via_PC.ino
D:\Arduino\arduino-builder -compile -logger=machine -hardware D:\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -built-in-libraries D:\Arduino\libraries -libraries D:\Eigenaar\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10810 -build-path C:\Users\Eigenaar\AppData\Local\Temp\arduino_build_383311 -warnings=none -build-cache C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino5.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=D:\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=D:\Arduino\hardware\tools\avr -verbose E:\LEDs_Via_PC\LEDs_Via_PC.ino
Using board 'nano' from platform in folder: D:\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: D:\Arduino\hardware\arduino\avr
Detecting libraries used...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o nul
Generating function prototypes...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"D:\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch aan het compileren...
"D:\\Arduino\\hardware\\tools\\avr/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=10810 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-ID:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-ID:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp" -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Eigenaar\AppData\Local\Temp\arduino_cache_217183\core\core_arduino_avr_nano_cpu_atmega328_fd040c28ca717db04400ddff4ecd4334.a
Linking everything together...
"D:\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311/LEDs_Via_PC.ino.elf" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311\\sketch\\LEDs_Via_PC.ino.cpp.o" "C:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311/..\\arduino_cache_217183\\core\\core_arduino_avr_nano_cpu_atmega328_fd040c28ca717db04400ddff4ecd4334.a" "-LC:\\Users\\Eigenaar\\AppData\\Local\\Temp\\arduino_build_383311" -lm
d:/arduino/hardware/tools/avr/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
[/sup]
exit status 1
Fout bij het compileren voor board Arduino Nano

FOUND OUT THE PROBLEM! Processor needed to be on (old bootloader) mode

Post the code?

I've merged your other cross-post @programmerDaan.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Selecting the old boot loader should not affect the compiling, only the upload.

Strange.