openexr-devel
[Top][All Lists]
Advanced

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

[Openexr-devel] Trouble compiling with EXR files


From: Brian Clark
Subject: [Openexr-devel] Trouble compiling with EXR files
Date: Wed, 5 Nov 2003 00:44:08 -0600

Hello.

I am trying to get the OpenEXR format working with some existing code, but
I get strange errors when I try to include the EXR headers.

I took my old code, written on linux, and brought it over to the Mac
(where I plan to do my programming from now on), compiled and ran it with
Xcode, gcc 3.3.  No problems.  I wrote an alternate function to write out
as EXR if that option was selected.  Nothing fancy, just the basic RGBA
image file, code essentially lifted from the documentation/website.

I included the OpenEXR lib files in my project by including the path
/usr/local/lib in the Xcode Preferences->Source Trees.

In the header file that includes the EXR writing function, I wrote
#include <OpenEXR/half.h>.

When I compile, I get a slew of errors (I believe most of them are caused
because the compiler is confused by the first one--at least that's the way
it's been in my very limited experience), the first of which is:
field `img' has incomplete type

The line in question refers to my declaration of the variable img, which
is of type ImageClass, a class that I #include at the beginning of this .h
file (Texture.h).  In fact, here it is, in context:
public:
        ImageClass img;
        int decalMode, imgType, edgeMode, format;
        double Sx,Sy,u,v,theta,scale,shiftX,shiftY;
        etc...

There are no direct references to anything EXR in this Texture.h file,
where the error occurs according to the compiler.
The most direct reference is the declaration of my img variable, which
is of class ImageClass, which is the class which uses EXR files and has
the #include.

I thought it might be a naming conflict with Half.h, so I changed img to
texImg, with no change.  ImageClass used to be Image, and changing it to
ImageClass didn't resolve the conflict.

I'm left thinking that either I don't have it set up right in Xcode, which
is quite possible, because I've never used it before, or I'm not including
the EXR files right, which is also quite possible, since I've never used
an exterior library set before that wasn't set up by a sysadmin.  Do I
need to #include something other than OpenEXR/half.h?

I can't make sense out of the error message, either.  Calling the class a
"field" seems odd to me, and saying that it's incomplete I also find odd,
since the class was working before--I only added a function and the
#includes to it.

One thing that's worth noting:  I can comment out all references to EXR
files, and it compiles fine.  If I inlcude ONLY the #include
<OpenEXR/half.h> line (and nothing that uses it), I get the errors.  I'm
leaning toward thinking that I am not including the right .h files.  Or is
it something more complicated?

Anybody got any ideas?  Thanks for your time!

Brian

PS.  Here's an incomplete list of some errors that get spewed...

Texture.h:37: error: field `img' has incomplete type
Texture.h:28: error: `const int half::EXR' is not a static member of
`class half'
Texture.h:27: error: `const int half::PPM' is not a static member of
`class half'
Light.h:20: confused by earlier errors, bailing out
half.h:541: error: syntax error before `.' token
half.h:540: error: `half half::h' is not a static member of `class half'
half.h:533: error: syntax error before `<<=' token
half.h:532: error: syntax error before `>>=' token
half.h:519: error: syntax error before `<<=' token
half.h:518: error: syntax error before `+=' token
half.h:517: error: syntax error before `>>=' token
half.h:508: error: invalid use of member `half::_h'
half.h:508: error: `short unsigned int half::e' is not a static member of
`class half'
half.h:507: error: invalid use of member `half::_h'
half.h:507: error: `short unsigned int half::s' is not a static member of
`class half'
half.h:493: error: syntax error before `const'
half.h:493: macro "round" requires 2 arguments, but only 1 given
half.h:143: error: field `round' has incomplete type


[ ][ Brian Clark ][ ][ address@hidden ][ ]






reply via email to

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