Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 9822

Summary: libjpeg.so will not link with C++ programs
Product: [Retired] Red Hat Linux Reporter: conrad
Component: libjpegAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: conrad
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-28 05:50:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified jpeglib.h so the libjpeg will link with C++ programs none

Description conrad 2000-02-28 05:46:59 UTC
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 05:50:59 UTC
Created attachment 133 [details]
modified jpeglib.h so the libjpeg will link with C++ programs

Comment 2 Bernhard Rosenkraenzer 2000-06-17 19:54:44 UTC
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.