Hello Tom,

> Hi,
>   Has anyone had success build OSG on mac 10.5? I downloaded the  
> lastest source code and tried to build it. It gives the following  
> error:
>
> OpenSG/Source/Base/Base/OSGBaseTypeTraits.h:1038: error:  
> redefinition of 'struct osg::TypeTraits<osg::UInt32>'
> OpenSG/Source/Base/Base/OSGBaseTypeTraits.h:452: error: previous  
> definition of 'struct osg::TypeTraits<osg::UInt32>'

Yes, it is possible to compile OSG 1.8 successfully on Mac OS 10.5.

What goes wrong in your case is hard to say without giving us more  
information. I can just give you some hints to solve the problem.

OSGBaseTypeTraits defines classes that contain meta data for all data  
types used in OpenSG. The problem is that there is a conflict between  
the type trait class defined for OSG::UInt32 (which is defined as  
"unsigned int") and the trait class defined for GLenum. Before Mac OS  
10.5, GLenum was defined as "unsigned long". Starting with Mac OS  
10.5, it is defined as "unsigned int". So on Mac OS 10.5, we are not  
allowed to define the trait class for GLenum. That's why it is inside  
an "#ifdef OSG_GLENUM_NEQ_UINT32".

OSG_GLENUM_NEQ_UINT32 is defined in "OpenSG/Source/Base/Base/ 
OSGConfig.h". The relevant lines look like this:

# include <AvailabilityMacros.h>
# if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED  
< MAC_OS_X_VERSION_10_5)
#  define OSG_GLENUM_NEQ_UINT32
# endif

For some reason, that code fails. As a quick fix, simply make sure  
OSG_GLENUM_NEQ_UINT32 is not defined. But you'll probably run into  
problems later. Try to find out why the code above fails to detect  
your system as Mac OS 10.5.

Bye,

Patrick


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to