[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] CTL and Imf2.0
From: |
Peter Hillman |
Subject: |
Re: [Openexr-devel] CTL and Imf2.0 |
Date: |
Thu, 11 Apr 2013 09:17:39 +1200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
Do you mean openexr_ctl, or CTL itself?
It seems openexr_ctl tries to do the only thing that breaks with
namespacing turned on: it tries to forward-declare classes in the Imf
namespace.
With EXR-2.0 you can - and need to - simply #include <ImfForward.h> to
forward-declare.
To build openexr_ctl with namespacing enabled, edit the file
IlmImfCtl/ImfCtlApplyTransforms.h replacing these lines:
namespace Imf{
class Header;
class FrameBuffer;
}
with this
#include <ImfForward.h>
This is the case in general - gcc reports errors caused by forward
declarations with messages such as this:
ImfCtlApplyTransforms.cpp:87:12: error: reference to 'Header' is ambiguous
/usr/local/include/OpenEXR/ImfHeader.h:69:18: error: candidates are:
class Imf_2_0::Header
./ImfCtlApplyTransforms.h:192:11: error: struct Imf::Header
I'd recommend leaving namespacing enabled wherever possible, and switch
to using ImfForward.h.
Looking around, it seems forward declarations of Imf classes are
relatively uncommon, so this shouldn't arise often.
Apologies for this bug slipping through: I did test all these packages
but somehow missed this error.
Probably a case of under caffeination syndrome on my part
With the latest gcc, I can't get either CTL or openexr_ctl to build
without modifying various files to include stdlib.h and string.h.
Perhaps it's time for an update!
Peter
On 04/11/2013 02:57 AM, Gonzalo Garramuno wrote:
I am trying to use CTL with OpenEXR 2.0 and find out that the main
headers are now under the Imf_2_0 namespace, while CTL expects them in
the Imf namespace.
I was wondering what's the proper way to go around this.
_______________________________________________
Openexr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/openexr-devel