PDA

View Full Version : How to link against a libqjpeg_debug.dylib?



Alex_123
23rd May 2009, 10:49
Hello! I have Qt4 installed on MAC OS.

I need to build a library that uses libJPEG functions. Since I don't have this library installed, I used declarations from Qt4 plugins folder to compile my object files.

After that I tried to link the library against libqjpeg_debug.dylib (I used g++ -dynamic -dynamiclib -L<path to plugins/imageformats> -lqjpeg_debug <other parameters, frameworks and libraries>).

As a result I got a set of unresolved symbols such as jpeg_CreateCompress and similar. I did not encounter this problem when linking against Qt3 libs. Maybe, this approach works on Qt 3 because Qt 3 has libJPEG functions embedded in the qt library (but I'm not quite sure about it).

So, is there a way to link against the dylib.

Alex_123
23rd May 2009, 11:39
One more thing. nm libqjpeg_debug.dylib prints all the symbols I need, so there must be a problem in linking.

wysota
24th May 2009, 10:54
qjpeg_debug is also a library that uses libjpeg to do its work. You should link to libjpeg directly, without linking to the plugin.