Why do I get an error immediately

code: void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}
ERROR: c:/users/mataj/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

type or paste code here

Compilation error: exit status 1

Please edit your post to remove the screenshot, and post the code and error messages as described in the "How to get the best out of this forum" post, linked at the head of every forum category.

sorry

Maybe you installed the wrong version?

Which version of the Arduino IDE did you install, and which board did you select?

If you are using IDE 2.x, reading and following the instructions in the linked message below may be of help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.