path=c:\devkitadv\bin
gcc -o %1.elf %1 -lm c:\pex\gbademo\gba.a
objcopy -O binary %1.elf %1.gba
c:\visualboy\VisualBoyAdvance.exe %1.gba
where %1 is main.c
im trying to create the main.c.gba but GCC says "undefined reference to 'drawSquare'"
in Dev-Cpp, when i wrote in Project Options->Parameters->Linker:
–lm ../GBAEngine/GBAEngine.a
(its the same library)
i dont get an error at all, so i copy-pasted –lm and i find out that the -lm in make.bat is a simple -
but the -lm in Dev-Cpp uses a longer -, which i cant use in DOS.
when i use the longer - in make.bat, i get following error:
"gcc: ulm: No such file or directory"
where u is some europian u with a triangle on it.
what should i write?
thanks,
pex.
[Edited by - pex22 on December 3, 2004 3:24:44 PM]
including libraries to GCC project in a makefile
Hi.
this is my make.bat:
Quote:Original post by pex22Okay I want to help you, but I need to get some things clear first. So you're using a tool set called devkitadv for GBA development. It includes a port of GCC with various libraries and other programs. You've written a batch script to compile your game, and you're getting a rather classic compilation error. Is that correct?
Hi.
this is my make.bat:path=c:\devkitadv\bingcc -o %1.elf %1 -lm c:\pex\gbademo\gba.aobjcopy -O binary %1.elf %1.binc:\visualboy\VisualBoyAdvance.exe %1.gba
where %1 is main.c
im trying to create the main.c.gba but GCC says "undefined reference to 'drawSquare'"
in Dev-Cpp, when i wrote in Project Options->Parameters->Linker:
–lm ../GBAEngine/GBAEngine.a
(its the same library)
i dont get an error at all, so i copy-pasted –lm and i find out that the -lm in make.bat is a simple -
but the -lm in Dev-Cpp uses a longer -, which i cant use in DOS.
when i use the longer - in make.bat, i get following error:
"gcc: ulm: No such file or directory"
where u is some europian u with a triangle on it.
what should i write?
thanks,
pex.
Quote:Original post by pex22Sorry for the long wait.
yep
i use the GCC from devkitadv and drawSquare is inside GBAEngine.a
From your sample batch script, you're not linking with GBAEngine.a. You only state gba.a, and I can only assume these are separate libraries. Try linking with both.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement