Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.75k stars 187 forks source link

undefined reference to 'main' error while compiling #348

Closed abadede919302 closed 1 month ago

abadede919302 commented 1 month ago

Hi, I was making the Hello World program in SGDK, and when I compile it i get an error:

C:\Users\vella\OneDrive\Desktop\SGDK>set GDK="C:\Users\vella\OneDrive\Desktop\SGDK"

C:\Users\vella\OneDrive\Desktop\SGDK>%GDK%\bin\make -f "C:\Users\vella\OneDrive\Desktop\SGDK\makefile.gen" release && START /B "C:\Users\vella\OneDrive\Desktop\Gens KMod\gens.exe" %CD%/out/rom.bin
C:/Users/vella/OneDrive/Desktop/SGDK/bin/mkdir.exe -p src/boot
C:/Users/vella/OneDrive/Desktop/SGDK/bin/mkdir.exe -p out
C:/Users/vella/OneDrive/Desktop/SGDK/bin/gcc.exe -m68000 -BC:/Users/vella/OneDrive/Desktop/SGDK/bin -n -T C:/Users/vella/OneDrive/Desktop/SGDK/md.ld -nostdlib out/sega.o @out/cmd_ C:/Users/vella/OneDrive/Desktop/SGDK/lib/libmd.a C:/Users/vella/OneDrive/Desktop/SGDK/lib/libgcc.a -o out/rom.out -Wl,--gc-sections -flto
C:\Users\vella\AppData\Local\Temp\cc8MUycR.ltrans5.ltrans.o: In function `_reset_entry':
<artificial>:(.text+0x5b0): undefined reference to `main'
C:\Users\vella\AppData\Local\Temp\cc8MUycR.ltrans5.ltrans.o: In function `_start_entry':
<artificial>:(.text+0x1104): undefined reference to `main'
<artificial>:(.text+0x11da): undefined reference to `main'
make: *** [out/rom.out] Error 1

How do i fix this??

thomasgoldstein commented 1 month ago

The GitHub issues are for bug reports or feature requests, not for support. For support, you can go to the Discord server: https://discord.gg/xmnBWQS

Stephane-D commented 1 month ago

Not a bug. (support request)

abadede919302 commented 1 month ago

The GitHub issues are for bug reports or feature requests, not for support. For support, you can go to the Discord server: https://discord.gg/xmnBWQS

Okay i see. I will use Discord for support next time.