views:

39

answers:

1

I'm having problems with compiling a project I'm working on. Everything else works just fine, but when I compile, I get this error message:

/usr/bin/ld:obj/content/xmSound.o: file format not recognized; treating as linker script

I have no idea why this happens. It's probably some error in the code, but I don't know. The source file xmSound.o is compiled from can be found here and the makefile I'm using is here.

+2  A: 

Run 'file obj/content/xmSound.o' and compare what it says for that file with some other object file that the loader does not complain about.

The chances are that the rule for building that object file is incorrect, somehow, and the file you have is not an object file at all.

Jonathan Leffler
Huh. `obj/content/xmSound.o: GCC precompiled header (version 013) for C++` What the heck? My makefile rules must be wrong somehow.
esalaka
Oh, yeah, I know what's wrong now. Make is passing both xmSound.cpp and xmSound.h to g++, which then compiles them into a precompiled header instead of an object file. I just gotta fix my rules and everything will be good and awesome. I hope.
esalaka
Yup, worked. Thanks.
esalaka