Thanks for checking Peter, I'll follow this up.

Piotr

________________________________________
From: openexr-devel-bounces+pstanczyk=ilm....@nongnu.org 
[openexr-devel-bounces+pstanczyk=ilm....@nongnu.org] on behalf of Peter Hillman 
[pet...@wetafx.co.nz]
Sent: 10 April 2013 14:17
To: openexr-devel@nongnu.org
Subject: Re: [Openexr-devel] CTL and Imf2.0

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
> Openexr-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/openexr-devel


_______________________________________________
Openexr-devel mailing list
Openexr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel

_______________________________________________
Openexr-devel mailing list
Openexr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel

Reply via email to