gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Weird Error

#38315 - torix - Fri Mar 25, 2005 10:53 pm

I was trying to compile a program that used Socrates.h (SGADE).

I'm using Mac OS X 10.3, and I'm using the arm-elf-gcc.

Every time I compile the file, I get this error:

Quote:

/Users/anthony/Desktop/devkitARM_r11_OSX/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/crt0.o(.text+0xe8): In function `start':
: undefined reference to `main'
/var/tmp//cc3xmcaR.o(.text+0x10): In function `AgbMain':
: undefined reference to `SoDisplayInitialize'
/var/tmp//cc3xmcaR.o(.text+0x1c): In function `AgbMain':
: undefined reference to `SoPaletteSetGreyScale'
/var/tmp//cc3xmcaR.o(.text+0x20): In function `AgbMain':
: undefined reference to `SoMode4RendererEnable'
/var/tmp//cc3xmcaR.o(.text+0x24): In function `AgbMain':
: undefined reference to `SoMode4RendererClear'
/var/tmp//cc3xmcaR.o(.text+0x28): In function `AgbMain':
: undefined reference to `SoFontGetDefaultFontImage'
/var/tmp//cc3xmcaR.o(.text+0x44): In function `AgbMain':
: undefined reference to `SoMode4RendererDrawString'
/var/tmp//cc3xmcaR.o(.text+0x48): In function `AgbMain':
: undefined reference to `SoMode4RendererFlip'
collect2: ld returned 1 exit status


Does anyone have any idea what it means? Thanks.
_________________
I am 100% Newbie!!!

#38316 - crossraleigh - Fri Mar 25, 2005 11:06 pm

It looks like what you're trying to compile with devkitARM was meant to be compiled with DevKitAdvance. To use devkitARM, you need to change AgbMain() to main().

#38317 - Touchstone - Fri Mar 25, 2005 11:09 pm

It appears you are not including the socrates library file when linking. It also appears that you are calling your entry point AgbMain while the function start is looking for a function called main.
_________________
You can't beat our meat