openexr-devel
[Top][All Lists]
Advanced

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

[Openexr-devel] Include Conflicts


From: Brian Clark
Subject: [Openexr-devel] Include Conflicts
Date: Thu, 3 Jun 2004 17:28:54 -0500



Is anyone out there by any chance using code from the Numerical Recipes in C++ book? I just tried to add some of their code to a project with my OpenEXR libraries, and there seems to be a conflict.

If I #include <nr.h> to my Image class which also has half.h, ImfArray.h and ImfRgbaFile.h, I get an error about ambiguous definitions of functions. One such example is
static float pow(float x,float y)  in the file ImathMath.h.
But if I move the #includes around, there are functions in <complex> that have the same problem. I'm not even using <complex>, but it's included in the nr.h file that is included in all the Numerical Recipes .cpp files (and I don't think the functions I'm using are using <complex>).

I have used OpenEXR libraries in the past (this same file) before adding the NR includes. I have used the NR includes in a simple project where I just tested the NR libraries to see if they did what I wanted, and there was no problem. It's only when I put them together.

It's possible I just have a setting wrong in Xcode (I'm on OSX 10.3.3), which is why I want to check if anyone out there has been able to use them together. I will also say that it's possible I'm going about including things the wrong way--I'm not experienced with tying other people's code into my projects.

Failing having a setting or include order that someone can tell me from their experience, I guess I can just go through the nr.h code and comment out any libraries that I don't need for this project. That may be a whole new can of worms in messing with other dependencies--I don't know. I've never done anything like that before.

Comments?  Bueller?  Bueller?  Bueller?

Brian





reply via email to

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