libjpeg.so doesn't want to link with C++ programs (as compiled with egcs 1.1.2), unless the following is added to /usr/include/jpeglib.h (from libjpeg-devel): (+ are the additions) #include "jmorecfg.h" /* seldom changed options */ + #ifdef __cplusplus + extern "C" { + #endif /* Version ID for the JPEG library. (..skip to bottom of file..) #include "jerror.h" /* fetch error codes too */ #endif + #ifdef __cplusplus + } + #endif #endif /* JPEGLIB_H */
Created attachment 133 [details] modified jpeglib.h so the libjpeg will link with C++ programs
Technically, it's not a bug because you're supposed to do extern "C" { #include <jpeglib.h> } in C++ programs using libjpeg - but it can't hurt, so I've added the patch in Rawhide.