Bug 9822 - libjpeg.so will not link with C++ programs
libjpeg.so will not link with C++ programs
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: libjpeg (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-02-28 00:46 EST by conrad
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-28 00:50:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
modified jpeglib.h so the libjpeg will link with C++ programs (45.21 KB, text/plain)
2000-02-28 00:50 EST, conrad
no flags Details

  None (edit)
Description conrad 2000-02-28 00:46:59 EST
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 */
Comment 1 conrad 2000-02-28 00:50:59 EST
Created attachment 133 [details]
modified jpeglib.h so the libjpeg will link with C++ programs
Comment 2 Bernhard Rosenkraenzer 2000-06-17 15:54:44 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.