From: Carlos O'Donell (carlos at domain baldric.uwo.ca)
Date: Wed 18 Sep 2002 - 17:15:03 IST
> Here's the command used:
> g++ -o jpeg_demo jpeg_demo.cpp -ljpeg
> And here's the response:
> /tmp/cc1Xp9yf.o: In function 'readJpeg(char*,Image*)':
> /tmp/cc1Xp9yf.o(.text+0x15): undefined reference to
> /tmp/cc1Xp9yf.o(.text+0x36): undefined reference to
> 'jpeg_CreateDecompress(jpeg_decompress_struct*,int,unsigned int)'
> ...etc. The rest are much the same listing the other jpeg library functions
> I used.
> Thanks again.
If ld doesn't complain that it can't find libjpeg.so, then you've
got _a_ library in the right place. Wether that library has the
functions you need is really the question.
As commented before:
nm -D /usr/lib/libjpeg.so | grep 'jpeg_CreateDecompress'
If this returns nothing, then you might have an old version of the
library and new demo source. You might also have multiple versions of
libjpeg, but ordered in such a way that you are linking / resolving
symbols against the old library (trusted paths / ld.so.conf order /
LD_LIBRARY_PATH settings ).
I just checked one of my debian/testing boxes, and I was able to
compile the example code with libjpeg62-dev... so in a utopian
world it should just work :)
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:56 GMT