GP2X Can't Compile .c File (uses Sdl) To .o (using Devkitgp2x)


paul_nicholls

Still Fresh
Joined
Nov 23, 2006
Messages
42
Gary Miller said:
If you used the "-save-temps " switch on the compile command then you should have produced an assembly output file along with the object file (.o) so we can look at that file and see what the C compiler did with the output file. The pascal web site might have people that already know how to fix this but we can continue to look at what is going on.

The output of "nm.rxe" is interesting but I have not used it to do anything other than generate assembly listings. Using the "-g" switch with nm.exe with and without the "-C" switch might be interesting.

Why don't you PM me with the "gp2x_sdl_mixer.o" file and I can look at it myself. If you can't get it in a PM then send me a PM and I will reply with my email address you could use to send it to me as a zip or the ".o".
I PM'd you with my email address as I couldn't seem to attach a file.

Sorry if this is a noob question, but when you say the save temps switch, do you mean using the "-s" switch?

I am using

CODE
arm-linux-gcc.exe -s -c gp2x_sdl_mixer.c


to compile the C code, which produces a .o file but no .s file.

cheers,
Paul
 
Last edited by a moderator:

paul_nicholls

Still Fresh
Joined
Nov 23, 2006
Messages
42
Just to help anyone else, I discovered what the problem was.

I have two files

gp2x_sdl_mixer.c
gp2x_sdl_mixer.pas

Both create files called "gp2x_sdl_mixer.o"...the latter .o file was overwriting the former .o file :(

It was a simple name clash...
cheers,
Paul
 
Top