Cygwin64 libjpeg-turbo missing/damaged library file

marco atzeri marco.atzeri@gmail.com
Sat Jul 27 19:43:00 GMT 2013


Il 7/27/2013 6:46 PM, Bill Hammond ha scritto:
>>> I am having trouble compiling an application that uses the libjpeg libraries under cygwin64.
>>>
>>> My program has compiled and run under cygwin32 for a long time. I can compile and run it
>>> under cygwin64 when I build and link against my own libjpeg.a. When I try and download the
>>> libjpeg-turbo libraries for cygwin64, it all comes apart. The "libjpeg-turbo" package is
>>> source only, and when I install "libjpeg-devel" and link against it with "-ljpeg", all the
>>> jpeg function calls are undefined.
>>>
>>> I am using the cygwin64 installer. Is there a problem with the cygwin64 libjpeg package(s),
>>> or am I not doing something right?
>>
>> Hi Bill,
>>
>> could you show your link instruction ?
>>
>> Have you a small test case ?
>> FYI the turbo devel package is : libturbojpeg-devel
>>
>> Regards
>> Marco
>
> So I installed the libturbojpeg-devel package, but I also had to install the libjpeg-devel
> package to get the proper include files added to /usr/include ("jconfig.h", "jerror.h" and
> so on).
>
> I can successfully link my program against my own libjpeg with:
>
> cc -g -lm -flto imgopt.o support.o ../common/jpeg.o ../common/gifread.o
> ../common/gifwrite.o ../common/image.o ../common/misc.o ../common/file.o
> ../common/fuzzy.o ../jpeg-8c/libjpeg.a -o a.exe
>
> When I try and link against the system libraries (same when I use -lturbojpeg):
>
> cc -g -lm -ljpeg -flto imgopt.o support.o ../common/jpeg.o ../common/gifread.o
> ../common/gifwrite.o ../common/image.o ../common/misc.o ../common/file.o
> ../common/fuzzy.o -o a.exe

try

cc -g -flto imgopt.o support.o ../common/jpeg.o ../common/gifread.o
  ../common/gifwrite.o ../common/image.o ../common/misc.o 
../common/file.o ../common/fuzzy.o -o a.exe -lm -ljpeg

>
> none of the libjpeg functions resolves:
>
> /tmp/cc4EItUr.ltrans4.ltrans.o: In function `jpeg_write':
> /home/proj/../common/jpeg.c:340: undefined reference to `jpeg_std_error'
> /home/proj/../common/jpeg.c:340:(.text+0x102): relocation truncated to fit: R_X86_64_PC32
> against undefined symbol `jpeg_std_error'
> /home/proj/../common/jpeg.c:349: undefined reference to `jpeg_destroy_compress'
>
> etc...
>
> I thought this might be another -flto problem, but compiling and linking without it makes no
> difference.
>
> Thanks!
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list