开发者

C++ Linker Error SDL Image - could not read symbols

I'm trying to use the SDL_Image library and I've adde开发者_如何学God the .so to the link libraries list for my project (I'm using Code::Blocks, by the way).

After doing this, when I go to compile, I get this error:

Linking console executable: bin/Debug/ttfx
/usr/lib32/libSDL_image-1.2.so: could not read symbols: File in wrong format

What does this mean and how can I get it working?

Edit: I'm using gcc.

Thanks!


During the linking step there are incompatibilities since some of your object files were compiled for 32-bit and some for 64-bit. Looking at its path libSDL_image.so was probably compiled for 32-bit.

If you use the GNU compiler add -m32 to your CXXFLAGS to compile your objects for 32-bit, too.


This link and this one suggest that the problem is you're doing a 64-bit compile with a 32-bit library. YMMV

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜