undefined reference to 'setup'/'loop'

Good evening. I need advice about this code:

void setup()
{
Serial.begin(9600);  // put your setup code here, to run once:

}

void loop(byte giProdleva, byte znak)
{
znak = Serial.read();
giProdleva = random(1, 4);
if (Serial.available())
  {
  if (znak = '1') 
      {
      Serial.write("Vygenerovane bolo: ");
      Serial.print(giProdleva, DEC);
      }
  
// put your main code here, to run repeatedly:

   }

}

Error:

D:\Program Files\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -ID:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -ID:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\NikinePismenka.cpp -o C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\NikinePismenka.cpp.o 

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\hooks.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\WInterrupts.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\wiring.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\wiring_analog.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\wiring_digital.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\wiring_pulse.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\wiring_shift.c.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\abi.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\CDC.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HardwareSerial.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HardwareSerial0.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HardwareSerial1.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HardwareSerial2.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HardwareSerial3.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\HID.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\IPAddress.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\main.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\new.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\Print.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\Stream.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\Tone.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\USBCore.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\WMath.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\WString.cpp.o

Užit soubor skompilovaný již dříve: C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\core.a

D:\Program Files\Arduino/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp/NikinePismenka.cpp.elf C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp\NikinePismenka.cpp.o C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp/core.a -LC:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp -lm 

C:\Users\JASAM~1\AppData\Local\Temp\build4622811167929318654.tmp/core.a(main.cpp.o): In function `main':

D:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

Chyba kompilace.

Thank You Very Much.

void loop(byte giProdleva, byte znak)

Nope.

void loop(void);

Maybe

void loop ()
{
  byte giProdleva;
  byte znak;

This is my code where is the problem ? or where are the problems

const int LED=9; //Arduino'ya LED ifadesinin "9" sayısı anlamına geldiğini
// Böylelikle kod içerisinde ne zaman LED yazsak,Arduino bunun 9 olduğunu yazacak

void setup() {
// put your setup code here, to run once
pinMode(9, OUTPUT);//LED'imizin bağlı olduğu pini çıkış olarak ayarladık
digitalWrite(9, HIGH); //LED'imize güç verdik.

}

And Crush
core.a(main.cpp.o): In function main': C:\Program Files\Arduino\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to loop'

C:\Program Files\Arduino\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to `loop'

Well, the compiler is right. You do not have a loop() function. You MUST!

You haven't got a loop(). That's a problem.

Steve

Is it "Revive an old thread" day ?

I have seen comments on several old threads today.

I guess people are searching the forum for answers to their questions and finding something close but not quite right and tacking their question on the end.

I'm glad they do the searching but it would be better if they had the wit to start a new thread with their new question.

Steve