tunabrain / tungsten

High performance physically based renderer in C++11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't compile with OpenEXR

elaye opened this issue · comments

Hello,
Tungsten won't compile with OpenEXR on Linux Mint 17 64bit. The errors are the following:

/Dev/tungsten/src/core/io/ImageIO.cpp:46:32: error: invalid use of incomplete type ‘class Imf::OStream’
 class ExrOStream : public Imf::OStream
                                ^
In file included from /usr/include/OpenEXR/ImfOutputFile.h:46:0,
                 from /Dev/tungsten/src/core/io/ImageIO.cpp:15:
/usr/include/OpenEXR/ImfHeader.h:63:7: error: forward declaration of ‘class Imf::OStream’
 class OStream;
       ^
/Dev/tungsten/src/core/io/ImageIO.cpp:57:18: error: ‘virtual void Tungsten::ImageIO::ExrOStream::write(const char*, int)’ marked override, but does not override
     virtual void write(const char c[/*n*/], int n) override final
                  ^
/Dev/tungsten/src/core/io/ImageIO.cpp:64:24: error: ‘virtual Imath::Int64 Tungsten::ImageIO::ExrOStream::tellp()’ marked override, but does not override
     virtual Imf::Int64 tellp() override final
                        ^
/Dev/tungsten/src/core/io/ImageIO.cpp:69:18: error: ‘virtual void Tungsten::ImageIO::ExrOStream::seekp(Imath::Int64)’ marked override, but does not override
     virtual void seekp(Imf::Int64 pos) override final
                  ^
/Dev/tungsten/src/core/io/ImageIO.cpp: In constructor ‘Tungsten::ImageIO::ExrOStream::ExrOStream(Tungsten::OutputStreamHandle)’:
/Dev/tungsten/src/core/io/ImageIO.cpp:52:12: error: type ‘Imf::OStream’ is not a direct base of ‘Tungsten::ImageIO::ExrOStream’
     : Imf::OStream("Tungsten Wrapped Output Stream"),
            ^
...

There is more, tell me if you want the complete log. However it works perfectly well when I compile without OpenEXR.
Great software by the way!

I believe this was caused by a missing ImfIO include. Interestingly this did not cause issues on my platform.

I just pushed a fix, can you confirm that it works?

Yes, it works now!