Hello Keyan,
On 05/13/2011 03:03 AM, Keyan wrote:
> I am trying to include the testPassiveQT4.cpp into my application. although
> it compiles fine, when I only compile the OpenSG itself, I have difficulties
> to compile it as part of my application. for some reason, GLenum and UInt32
> are both defined as "unsigned int" which leads to a number of redefinition
> errors as the following:
>
> <path>/include/OpenSG/OSGExceptionBinaryDataHandler.h:121: error: ‘void
> OSG::ExceptionBinaryDataHandler::putValue(const GLenum&)’ cannot be overloaded
> <path>/include/OpenSG/OSGExceptionBinaryDataHandler.h:109: error: with ‘void
> OSG::ExceptionBinaryDataHandler::putValue(const OSG::UInt32&)’
>
> Here is a second example, that is more explicit:
>
> <path>include/OpenSG/OSGBaseFunctions.inl:2889: error: redefinition of
> ‘ValueTypeT OSG::osgSwapBytes(ValueTypeT) [with ValueTypeT = unsigned int]’
> <path>/include/OpenSG/OSGBaseFunctions.inl:2869: error: ‘ValueTypeT
> OSG::osgSwapBytes(ValueTypeT) [with ValueTypeT = unsigned int]’ previously
> declared here
hmm, these are already guarded by #ifdef OSG_GLENUM_NEQ_UINT32 which in
OSGConfig.h is set 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
Does your application include OSGConfig.h as it's first OpenSG header?
Have you set any of the defines that influence the definition of
OSG_GLENUM_NEQ_UINT32 above?
> i use cmake, and therefore, i chose to copy the FindOpenSG.cmake into my
> source-directory. to include opensg, i simply call
>
> find_package(OpenSG)
>
> and then use:
>
> IF(OpenSG_FOUND)
> include_directories(${OpenSG_INCLUDE_DIRS})
> link_directories(${OpenSG_LIBRARY_DIRS})
> ENDIF(OpenSG_FOUND)
>
> OpenSG_INCLUDE_DIRS points to the path, where I installed OpenSG (make
> install).
yes, that is how we use OpenSG in our projects too.
Cheers,
Carsten
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users