Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

I compiled my program and the only errors came up was to do with _modsi3 and _divsi3. I added the lines:

#-----------------------------------------------------------------------
# Library search path options. It points the location of libgcc.a and libm.a
#-----------------------------------------------------------------------
LIBDIRS = -L$(GCCHOMEPATH)/lib/gcc-lib/arm-elf/3.3.1 -L$(GCCHOMEPATH)/arm-elf/lib

#-----------------------------------------------------------------------
# Linker flag definitions
#-----------------------------------------------------------------------
LDFLAGS = $(LIBDIRS) -lm

Here is the errors:

---------------------------------------------------------------
TARGET: moon.elf
c:\gnude\bin\arm-elf-ld.exe -EL -Ttext 0 --emit-relocs -entry AEEMod_Loa
d -o moon.elf -Lc:\gnude/lib/gcc-lib/arm-elf/3.3.1 -Lc:\gnude/arm-elf/lib AEEMo
dGen.o AEEAppGen.o GCCResolver.o moon.o
moon.o(.text+0x16ac): In function `CGameMoon::Rand(short, short)':
: undefined reference to `__modsi3'
moon.o(.text+0x8a18): In function `CGameMoon::PlayHPSPCOMHP()':
: undefined reference to `__divsi3'
NMAKE : fatal error U1077: 'c:\gnude\bin\arm-elf-ld.exe' : return code '0x1'
Stop.

What can be the problem?

Thank you.

Changing your LDFLAGS = $(LIBDIRS) -lm line to
LDFLAGS = $(LIBDIRS) -lm -lc -lgcc
Can't remeber which one you want, so try both.
Steve.

Changing your LDFLAGS = $(LIBDIRS) -lm line to
LDFLAGS = $(LIBDIRS) -lm -lc -lgcc
Can't remeber which one you want, so try both.
Steve.

Steven Haggerty wrote:Changing your LDFLAGS = $(LIBDIRS) -lm line to
LDFLAGS = $(LIBDIRS) -lm -lc -lgcc
Can't remeber which one you want, so try both.
Steve.
I have tried this command line and it didn't work. Any idea?

Steven Haggerty wrote:Changing your LDFLAGS = $(LIBDIRS) -lm line to
LDFLAGS = $(LIBDIRS) -lm -lc -lgcc
Can't remeber which one you want, so try both.
Steve.
I have tried this command line and it didn't work. Any idea?