Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3BAA1D6F.7C1C0F90@sci.fi> Date: Thu, 20 Sep 2001 19:46:39 +0300 From: Mika Niemi Reply-To: mni AT sci DOT fi Organization: - X-Sender: "Mika Niemi" <@posti.saunalahti.fi> (Unverified) X-Mailer: Mozilla 4.72 [en]C-CONNECTNET (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin + libjpeg [C++] linking problem References: <3BA8D282 DOT 50507B49 AT sci DOT fi> <3BA8ECA2 DOT 1050703 AT ece DOT gatech DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, No rebuild is necessary. The jpeglib.h just needed the 'extern "C"' wrappers, which is the standard way of linking to C from C++. I added them, and it works now. Thanks, Mika PS. I don't follow this list. Charles Wilson wrote: > > 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/