Boost logo

Boost :

Subject: Re: [boost] [gil::io] clang compiler error
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-08-31 05:57:28


On 30 August 2013 21:33, Christian Henning <chhenning_at_[hidden]> wrote:
> Hi all,
>
> I'm trying to fix some compiler errors with clang and the new gil::io. The
> following trivial code just wont compile:
>
> extern "C"
> {
> #include <stdio.h>
> #include <jpeglib.h>
> }
>
> int main()
> {
> jpeg_create_compress(NULL);
>
> return 0;
> }
>
> The error is:
>
> undefined reference to `jpeg_CreateCompress'

I tested and both, GCC 4.8.1 and clang 3.3 compile and link w/o errors:

$ g++ -ljpeg jpeg_test.cpp
$ ldd ./a.out|grep jpeg
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f21297de000)

$ clang -ljpeg jpeg_test.cpp
$ ldd ./a.out|grep jpeg
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f4fe66b7000)

Best regards,

-- 
Mateusz  Loskot, http://mateusz.loskot.net
"Participation in this whole process is a form of torture" ~~ Szalony

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk