.o file not being built, linker is having fits. please help!

support for the ARM toolchain
Post Reply
DayTripperID
Posts: 22
Joined: Tue Aug 07, 2012 8:57 pm

.o file not being built, linker is having fits. please help!

Post by DayTripperID » Thu Aug 16, 2012 8:42 pm

I'm getting the following error when I compile:
linking exodus.elf
levels.o: In function `levelOne(OamState*)':
c:/devkitpro/projects/exodus/source/levels.cpp:177: undefined reference to `lazer_gfxTiles'
c:/devkitpro/projects/exodus/source/levels.cpp:177: undefined reference to `lazer_gfxPal'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/c/devkitpro/projects/exodus/exodus.elf] Error 1
"make": *** [build] Error 2
I have the header lazer_gfx.h included in levels.cpp.

lazer_gfx.h and lazer_gfx.s are both in the build folder, however, there is no lazer_gfx.o or lazer_gfx.d

Also, they were originally named "laser_gfx" but I changed the and re-exported the gfx file to see if it would have an effect, but it didn't.

The other graphics files are compiling just fine, I don't understand why the compiler is having fits with this one. I'm thinking that it will do the same with any new graphics I add to the project.

In summary: grit generates the .h and .s files, I include the .h file in the project, but then the .o and .d files don't generate when I make, and I get that error.

Any insight would be greatly appreciated. Thanks!

DayTripperID
Posts: 22
Joined: Tue Aug 07, 2012 8:57 pm

Re: .o file not being built, linker is having fits. please h

Post by DayTripperID » Sun Aug 19, 2012 3:34 am

Solved. I was using wingrit to manually export my png's because I was having trouble with grit rule files making bmp images instead of tiles, even when I was explicitly using the -gt option. I went back to using rule files and they finally exported with tiles. It solved the error and made the .o file just fine. I'm a noob.

mtheall
Posts: 210
Joined: Thu Feb 03, 2011 10:47 pm

Re: .o file not being built, linker is having fits. please h

Post by mtheall » Fri Aug 24, 2012 2:56 pm

The -gt options means tiled. You want to use -gb for bitmap graphics.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests