stary n00b
Joined: 12 Jul 2002 Posts: 30 Location: Stockholm
|
Posted: Wed May 21, 2003 6:50 pm Post subject: libjpeg not getting linked |
|
|
I've downloaded a tutorial example on SDL/OpenGL that uses libjpeg. The files compile ok, but at link time i get the following:
Code: | g++ -o BspLoader3 Main.o Init.o Camera.o Quake3Bsp.o Image.o Frustum.o `sdl-config --libs` -lGL -lGLU -lm -ljpeg
Image.o(.text+0x880): In function `DecodeJPG(jpeg_decompress_struct*, tImage*)':: undefined reference to `jpeg_read_header(jpeg_decompress_struct*, int)'
Image.o(.text+0x88b): In function `DecodeJPG(jpeg_decompress_struct*, tImage*)':: undefined reference to `jpeg_start_decompress(jpeg_decompress_struct*)' |
etc...
Can anyone tell me the obvious thing I'm missing here? the library is there (-ljpeg) and according to nm, the symbol jpeg_read_header exists in both /usr/lib/libjpeg.so and /usr/lib/libjpeg.a. Linking with libjpeg-mmx doesn't help either.
The system is a newly installed gentoo 1.4, and since I have used libjpeg on other systems before without problems it'd be nice if someone could point me the right way when it comes to this error. |
|