Boost logo

Boost :

Subject: Re: [boost] [gil::io] clang compiler error
From: Christian Henning (chhenning_at_[hidden])
Date: 2013-08-31 14:15:47


Thanks Mateusz, the problem is probably due to my environment which is
clang on Windows.

Christian

On Sat, Aug 31, 2013 at 5:57 AM, Mateusz Loskot <mateusz_at_[hidden]> wrote:

> 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
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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