Bug 9822 - libjpeg.so will not link with C++ programs
Summary: libjpeg.so will not link with C++ programs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libjpeg
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-02-28 05:46 UTC by conrad
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-28 05:50:53 UTC
Embargoed:


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

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.


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