compiling error

trying to compile upload marlin.error code below. how to fix? port is correct .u8glib is in library . board is correct.any help would be great thanks.

Arduino: 1.8.10 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\mike\AppData\Local\Temp\cczUzaQv.ltrans0.ltrans.o: In function `main':

C:\Users\mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/main.cpp:43: undefined reference to `setup'

C:\Users\mike\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1 Error compiling for board Arduino Mega or Mega 2560.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Has it occurred to you that we can’t see your code?

Does the code that you are trying to compile have a setup() and loop() function or does it have a main() function ?