On Sat, Jan 19, 2008 at 09:39:57PM +0100, Mike Hommey wrote:
> Package: libjpeg62-dev
> Version: 6b-14
> Severity: normal
> 
> When building WebKit with gcc 4.3, I got the following error:
> In file included from 
> ../../WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:45:
> /usr/include/jpeglib.h:914: error: 'FILE' has not been declared
> /usr/include/jpeglib.h:915: error: 'FILE' has not been declared
> 
> jpeglib.h uses FILE without #include'ing stdio.h, which is required in
> C++ with gcc 4.3.

Part of the issue is that upstream jpeglib.h is not designed to
compile under C++. It is not entirely clear to me that it is 
the responsibility of /usr/include/jpeglib.h to #include <stdio.h>
rather than the responsibility of WebKit. 

Actually since C programs have to #include <stdio.h>, it seems that 
WebKit should do it as well, and g++-4.3 is exhibiting a latent bug 
in WebKit.

The libjpeg documentation says that:

/*
 * Include file for users of JPEG library.
 * You will need to have included system headers that define at least
 * the typedefs FILE and size_t before you can include jpeglib.h.
 * (stdio.h is sufficient on ANSI-conforming systems.)
 * You may also wish to include "jerror.h".
 */

Cheers,
-- 
Bill. <[EMAIL PROTECTED]>

Imagine a large red swirl here. 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to