This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin + libjpeg [C++] linking problem


Please keep cygwin related topics on the cygwin list. I've redirected 
this mail there, and reset the Reply-To address for your convenience.

The jpeg library, as distributied by the official "Independent Jpeg 
Group" and by cygwin, is NOT c++ safe.  I know that the Red Hat libjpeg 
source RPM contains some patches to make it C++ safe; you may want to 
look at those, and build your own jpeg library from that.

In the (distant) future, I *may* incorporate these C++ changes in a 
future release of the jpeg library for cygwin.  Maybe.

--Chuck

Mika Niemi wrote:

> Hi,
> 
> I am having problems linking with libjpeg with cygwin. This is a recent
> installation of cygwin off the web. Are there any special switch I should
> use in the linking phase? The following command works fine in linux.
> 
> Mika Niemi
> 
> 
> 
>>bash-2.05$ g++ -o test test.o framewriter.o -ljpeg
>>framewriter.o(.text+0xa6):framewriter.cc: undefined reference to `import stub for jpeg_std_error(jpeg_error_mgr *)'
>>framewriter.o(.text+0xd8):framewriter.cc: undefined reference to `import stub for jpeg_CreateCompress(jpeg_compress_struct *, int, unsigned int)'
>>framewriter.o(.text+0x289):framewriter.cc: undefined reference to `import stub for jpeg_finish_compress(jpeg_compress_struct *)'
>>framewriter.o(.text+0x35a):framewriter.cc: undefined reference to `import stub for jpeg_stdio_dest(jpeg_compress_struct *, __sFILE *)'
>>framewriter.o(.text+0x3ac):framewriter.cc: undefined reference to `import stub for jpeg_set_defaults(jpeg_compress_struct *)'
>>framewriter.o(.text+0x3d0):framewriter.cc: undefined reference to `import stub for jpeg_set_quality(jpeg_compress_struct *, int, int)'
>>framewriter.o(.text+0x3f2):framewriter.cc: undefined reference to `import stub for jpeg_start_compress(jpeg_compress_struct *, int)'
>>framewriter.o(.text+0x4ec):framewriter.cc: undefined reference to `import stub for jpeg_write_scanlines(jpeg_compress_struct *, unsigned char **, unsigned int)'
>>framewriter.o(.text+0x51a):framewriter.cc: undefined reference to `import stub for jpeg_finish_compress(jpeg_compress_struct *)'
>>framewriter.o(.text+0x53b):framewriter.cc: undefined reference to `import stub for jpeg_destroy_compress(jpeg_compress_struct *)'
>>collect2: ld returned 1 exit status
>>
> 




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]