#898 car.h conflicts with OSG header

2.2.0
closed
nobody
defect
blocker
Graphics
2015-11-29
2014-08-11
No

Enable OSGGraph and compile with following change:

--- a/src/modules/graphic/osggraph/OsgView/OsgView.cpp
+++ b/src/modules/graphic/osggraph/OsgView/OsgView.cpp
@@ -23,7 +23,7 @@

#include "OsgMain.h"
#include "OsgView.h"
-//#include "OsgCar.h"
+#include "OsgCar.h"

static char buf[1024];
static char path[1024];

Errors:

In file included from /home/tlow/src/speeddreams/dev-osg/src/interfaces/raceman.h:31:0,
                 from /home/tlow/src/speeddreams/dev-osg/src/modules/graphic/osggraph/./OsgMain.h:25,
                 from /home/tlow/src/speeddreams/dev-osg/src/modules/graphic/osggraph/OsgView/OsgView.cpp:24:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:17: error: expected ‘;’ at end of member declaration
 #define _state  pub.state
                 ^
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:20: error: expected unqualified-id before ‘.’ token
 #define _state  pub.state
                    ^
/usr/include/osg/RenderInfo: In copy constructor ‘osg::RenderInfo::RenderInfo(const osg::RenderInfo&)’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:20: error: expected ‘(’ before ‘.’ token
 #define _state  pub.state
                    ^
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:20: error: expected ‘{’ before ‘.’ token
/usr/include/osg/RenderInfo: In constructor ‘osg::RenderInfo::RenderInfo(osg::State*, osg::View*)’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:20: error: expected ‘(’ before ‘.’ token
 #define _state  pub.state
                    ^
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:20: error: expected ‘{’ before ‘.’ token
/usr/include/osg/RenderInfo: In member function ‘osg::RenderInfo& osg::RenderInfo::operator=(const osg::RenderInfo&)’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘const class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/usr/include/osg/RenderInfo: In member function ‘unsigned int osg::RenderInfo::getContextID() const’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘const class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘const class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/usr/include/osg/RenderInfo: In member function ‘void osg::RenderInfo::setState(osg::State*)’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/usr/include/osg/RenderInfo: In member function ‘osg::State* osg::RenderInfo::getState()’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
/usr/include/osg/RenderInfo: In member function ‘const osg::State* osg::RenderInfo::getState() const’:
/home/tlow/src/speeddreams/dev-osg/src/interfaces/car.h:281:21: error: ‘const class osg::ref_ptr<osg::State>’ has no member named ‘state’
 #define _state  pub.state
                     ^
make[2]: *** [src/modules/graphic/osggraph/CMakeFiles/osggraph.dir/OsgView/OsgView.cpp.o] Error 1
make[1]: *** [src/modules/graphic/osggraph/CMakeFiles/osggraph.dir/all] Error 2
make: *** [all] Error 2

Discussion

  • beaglejoe

    beaglejoe - 2014-08-21

    I was able to get this to compile by rearranging the includes, but I am having other OSG issues. I posted a (hacky) patch if anyone with working OSG wants to try this.

     
  • Tom Low-Shang

    Tom Low-Shang - 2015-11-29

    I think this has been resolved. Close the ticket.

     
  • beaglejoe

    beaglejoe - 2015-11-29
    • status: new --> closed
    • Milestone: to be defined --> 2.2.0
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks