openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] Compiling with gcc4.0.1 - compilation error and fix


From: Jeff Clifford
Subject: [Openexr-devel] Compiling with gcc4.0.1 - compilation error and fix
Date: Mon, 18 Jul 2005 14:39:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040914

Hi,

I have just tried compiling the openEXR lib and tools using gcc4.0.1. Whereas gcc4.0.0 gives no errors I got the following one with gcc4.0.1:

../OpenEXR-1.2.2/exrmaketiled/Image.h:59: error: expected `)' before ‘&’ token
... other errors ...
gmake[1]: *** [Image.o] Error 1

It seems gcc 4.0.1 is a bit more pedantic in its checking than gcc 4.0.0:

If anyone else gets this error it can be fixed by adding a class forward declaration in OpenEXR-1.2.2/exrmaketiled/Image.h

....

#include <map>

class Image; <--------------- ********* Add this line ***********

class ImageChannel
{
public:

friend class Image;

ImageChannel (Image &Image);
virtual ~ImageChannel();

virtual Imf::Slice slice () const = 0;

Image & image () {return _image;}
const Image & image () const {return _image;}

private:

virtual void resize (int width, int height) = 0;

Image & _image;
};

....




Jeff Clifford.

Double Negative.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]