[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] Trouble compiling with EXR files
From: |
Brian Clark |
Subject: |
Re: [Openexr-devel] Trouble compiling with EXR files |
Date: |
Wed, 5 Nov 2003 13:52:48 -0600 |
Paul,
Thanks for the suggestions. Unfortunately, I'm still getting 54 errors,
which is what I was getting before. They seem to be the same.
I included /usr/local/include/OpenEXR in the header search path,
I included /usr/local/lib in the Library search paths,
and I set Preprocessor macros to PLATFORM_DARWIN_PPC restrict=
I also tried removing /usr/local/lib from the Preferences->source trees
option (which I had previously set in an effort to get it to work).
I was looking through the archives, and there was a post about getting
things to compile under ProjectBuilder and 10.2, but there was a post
later about how 10.3, gcc 3.3 solved all those problems, and I'm on 10.3,
gcc3.3, so I haven't started messing with the source code of the
libraries.
I tried setting the fields and restarting Xcode... no change. Any other
suggestions?
Thanks,
bc
On Wed, 5 Nov 2003, Paul Schneider wrote:
>
> The tricks for working with OpenEXR in Xcode are:
>
> 1) select your target in the browser and hit "Get Info" (cmd-I)
> 2) choose the "build" tab
> 3) add the location of the EXR headers to the "Header search paths"
> field. Unless you specified otherwise when you ran configure, this is
> "/usr/local/include/OpenEXR" without the quotes.
> 4) add "PLATFORM_DARWIN_PPC restrict=" without the quotes to the
> "Preprocessor macros" field.
> 5) add the location of the EXR libraries to the "Library search paths"
> field. Unless you specified otherwise when you ran configure, this is
> "/usr/local/lib" without the quotes.
>
> The thing you're missing is probably the macros. In particular, if
> PLATFORM_DARWIN_PPC isn't defined, the EXR headers will greatly confuse
> the compiler.
>
> Of course, the only way you'd know that is if you dug through either
> the OpenEXR Makefiles or the archives of this mailing list, which isn't
> very user-friendly. I'm planning to put this arcane knowledge in a
> README for the next OpenEXR release, and I'm working on a sample Xcode
> project that folks will be able to use as a starting point.
>
> Good luck!
> Paul
>
>
> On Tuesday, November 4, 2003, at 10:44 PM, Brian Clark wrote:
>
> >
> > 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 ][ ]
> >
> >
> >
> >
> > _______________________________________________
> > Openexr-devel mailing list
> > address@hidden
> > http://mail.nongnu.org/mailman/listinfo/openexr-devel
> >
>
>
[ ][ Brian Clark ][ ][ address@hidden ][ ]