Page 1 of 1

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

Posted: Thu Aug 16, 2012 8:42 pm
by DayTripperID
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!

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

Posted: Sun Aug 19, 2012 3:34 am
by DayTripperID
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.

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

Posted: Fri Aug 24, 2012 2:56 pm
by mtheall
The -gt options means tiled. You want to use -gb for bitmap graphics.