[GRASS-dev] errors compiling nviz in GRASS 7
William Kyngesburye
woklist at kyngchaos.com
Wed Jul 9 22:39:15 EDT 2008
On Jul 6, 2008, at 9:05 PM, William Kyngesburye wrote:
> On Jul 6, 2008, at 6:58 PM, Michael Barton wrote:
>
>> Here is the location of the native OGL (called AGL on Mac).
>>
>> /System/Library/Frameworks/AGL.framework/Versions/A/Headers/gl.h
>>
> Which is a symlink to /System/Library/Frameworks/OpenGL.frameworks/
> Headers/gl.h. Which is what you get when you configure with --with-
> opengl=aqua.
>
> Which spits out a bunch cpp errors in the Carbon includes, from the
> AGL include. More than I can wrap my brain around at the moment,
> but it looks like we need to work on this.
>
Learned a new trick today (probably standard stuff for the programming
gurus) - I added -E to the compile flags and found that an unexpected
macro was substituted for a buried Carbon struct:
typedef struct CMFixedXYZColor {
Fixed X;
Fixed Y;
Fixed Z;
} CMFixedXYZColor;
which came out as:
typedef struct CMFixedXYZColor {
Fixed 0;
Fixed 1;
Fixed 2;
} CMFixedXYZColor;
It appears X, Y and Z (all caps, that is) are defined in gstypes.h in
GRASS. I was able to fix the problem by moving the lines in nviz.h:
#include <grass/gsurf.h>
#include <grass/gstypes.h>
to *after* the GL includes.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
Earth: "Mostly harmless"
- revised entry in the HitchHiker's Guide to the Galaxy
More information about the grass-dev
mailing list