Ogre wrapper won't compile

Help
2009-11-24
2013-03-24
  • OgreEventListeners.h does not exist anymore in ogre 1.6

    Also, fstream is in boost/filesystem/fstream.hpp

    <code>
    sudo python setup.py install
    Reading config.cfg…                                                          
    Version-specific config file (config_py26.cfg) not available                   
    Updating version in the cgkitinfo module…              
    Version: 2.0.0alpha9 (Nov 24 2009, 14:43)                                      
    3DS importer:      enabled                                                     
    VRML/X3D importer: disabled                                                    
    OpenSceneGraph:    disabled                                                    
    OGRE:              enabled                                                     
    3DXWare:           disabled                                                    
    Wintab:            disabled                                                    
    Glove module:      disabled                                                    
    ======================================================================         
    Include paths (INC_DIRS):                                                      

    supportlib/include
    /usr/include/OGRE

    Library paths (LIB_DIRS):

    supportlib/lib

    Libraries to link with (LIBS):

    boost_python-mt, core, 3ds, OgreMain, GL, GLU

    Forcing compilation of py_wrapper.cpp

    pyrex/c/_pointcloud.c is up-to-date                                  
    running install                                                      
    running build                                                        
    running build_py                                                     
    copying cgkit/cgkitinfo.py -> build/lib.linux-i686-2.6/cgkit         
    running build_ext                                                    
    building '_core' extension                                           
    gcc -pthread -fno-strict-aliasing -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_MAX_ARITY=18 -DLIB3DS_AVAILABLE -DOGRE_AVAILABLE -Isupportlib/include -I/usr/include/OGRE -I/usr/include/python2.6 -c wrappers/py_wrapper.cpp -o build/temp.linux-i686-2.6/wrappers/py_wrapper.o                                                                                   
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++                          
    gcc -pthread -fno-strict-aliasing -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_MAX_ARITY=18 -DLIB3DS_AVAILABLE -DOGRE_AVAILABLE -Isupportlib/include -I/usr/include/OGRE -I/usr/include/python2.6 -c wrappers/ogre/OgreCore.cpp -o build/temp.linux-i686-2.6/wrappers/ogre/OgreCore.o                                                                             
    cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++                          
    In file included from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/OgreCore.h:75:21: error: fstream.h: No such file or directory                                                  
    In file included from wrappers/ogre/OgreCore.h:79,                                                                           
                     from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/MyListener.h:46:32: error: OgreEventListeners.h: No such file or directory                                     
    wrappers/ogre/MyListener.h:47:26: error: OgreKeyEvent.h: No such file or directory                                           
    wrappers/ogre/OgreCore.cpp:584:6: warning: multi-line comment                                                                
    In file included from wrappers/ogre/OgreCore.h:79,                                                                           
                     from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/MyListener.h:63: error: expected class-name before ‘{’ token                                                   
    wrappers/ogre/MyListener.h:115: error: ‘KeyEvent’ has not been declared                                                      
    wrappers/ogre/MyListener.h:120: error: ‘KeyEvent’ has not been declared                                                      
    wrappers/ogre/MyListener.h:163: error: ‘KeyEvent’ has not been declared                                                      
    wrappers/ogre/MyListener.h: In member function ‘void MyListener::keyPressed(int*)’:                                          
    wrappers/ogre/MyListener.h:139: error: request for member ‘getKeyChar’ in ‘* e’, which is of non-class type ‘int’            
    wrappers/ogre/MyListener.h:140: error: request for member ‘getKey’ in ‘* e’, which is of non-class type ‘int’                
    wrappers/ogre/MyListener.h:141: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyListener.h: In member function ‘void MyListener::keyReleased(int*)’:                                         
    wrappers/ogre/MyListener.h:177: error: request for member ‘getKeyChar’ in ‘* e’, which is of non-class type ‘int’            
    wrappers/ogre/MyListener.h:178: error: request for member ‘getKey’ in ‘* e’, which is of non-class type ‘int’                
    wrappers/ogre/MyListener.h:179: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’          
    In file included from wrappers/ogre/OgreCore.h:80,                                                                           
                     from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/MyMouseListener.h: At global scope:                                                                            
    wrappers/ogre/MyMouseListener.h:65: error: expected class-name before ‘{’ token                                              
    wrappers/ogre/MyMouseListener.h:105: error: ‘MouseEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:127: error: ‘MouseEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:145: error: ‘MouseEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h: In member function ‘void MyMouseListener::mouseMoved(int*)’:                                
    wrappers/ogre/MyMouseListener.h:113: error: request for member ‘getX’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:114: error: request for member ‘getY’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:115: error: request for member ‘getRelX’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:116: error: request for member ‘getRelY’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:119: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:119: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:120: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:120: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:121: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:121: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h: In member function ‘void MyMouseListener::mouseDragged(int*)’:                              
    wrappers/ogre/MyMouseListener.h:135: error: request for member ‘getX’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:136: error: request for member ‘getY’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:137: error: request for member ‘getRelX’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:138: error: request for member ‘getRelY’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:140: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:140: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:141: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:141: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:142: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:142: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h: In member function ‘void MyMouseListener::mouseDragMoved(int*)’:                            
    wrappers/ogre/MyMouseListener.h:153: error: request for member ‘getX’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:154: error: request for member ‘getY’ in ‘* e’, which is of non-class type ‘int’             
    wrappers/ogre/MyMouseListener.h:155: error: request for member ‘getRelX’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:156: error: request for member ‘getRelY’ in ‘* e’, which is of non-class type ‘int’          
    wrappers/ogre/MyMouseListener.h:158: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:158: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:159: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:159: error: ‘InputEvent’ has not been declared                                               
    wrappers/ogre/MyMouseListener.h:160: error: request for member ‘getModifiers’ in ‘* e’, which is of non-class type ‘int’     
    wrappers/ogre/MyMouseListener.h:160: error: ‘InputEvent’ has not been declared                                               
    In file included from wrappers/ogre/OgreCore.h:81,                                                                           
                     from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/MyMouseButtonListener.h: At global scope:                                                                      
    wrappers/ogre/MyMouseButtonListener.h:69: error: expected class-name before ‘{’ token                                        
    wrappers/ogre/MyMouseButtonListener.h:117: error: ‘MouseEvent’ has not been declared                                         
    wrappers/ogre/MyMouseButtonListener.h:139: error: ‘MouseEvent’ has not been declared                                         
    wrappers/ogre/MyMouseButtonListener.h:165: error: ‘MouseEvent’ has not been declared                                         
    wrappers/ogre/MyMouseButtonListener.h:170: error: ‘MouseEvent’ has not been declared                                         
    wrappers/ogre/MyMouseButtonListener.h:175: error: ‘MouseEvent’ has not been declared                                         
    wrappers/ogre/MyMouseButtonListener.h: In member function ‘void MyMouseButtonListener::mouseReleased(int*)’:                 
    wrappers/ogre/MyMouseButtonListener.h:130: error: request for member ‘getButtonID’ in ‘* e’, which is of non-class type ‘int’
    wrappers/ogre/MyMouseButtonListener.h:131: error: request for member ‘getX’ in ‘* e’, which is of non-class type ‘int’       
    wrappers/ogre/MyMouseButtonListener.h:132: error: request for member ‘getY’ in ‘* e’, which is of non-class type ‘int’       
    wrappers/ogre/MyMouseButtonListener.h:133: error: request for member ‘getRelX’ in ‘* e’, which is of non-class type ‘int’    
    wrappers/ogre/MyMouseButtonListener.h:134: error: request for member ‘getRelY’ in ‘* e’, which is of non-class type ‘int’    
    wrappers/ogre/MyMouseButtonListener.h: In member function ‘void MyMouseButtonListener::mousePressed(int*)’:                  
    wrappers/ogre/MyMouseButtonListener.h:153: error: request for member ‘getButtonID’ in ‘* e’, which is of non-class type ‘int’
    wrappers/ogre/MyMouseButtonListener.h:157: error: request for member ‘getX’ in ‘* e’, which is of non-class type ‘int’       
    wrappers/ogre/MyMouseButtonListener.h:158: error: request for member ‘getY’ in ‘* e’, which is of non-class type ‘int’       
    wrappers/ogre/MyMouseButtonListener.h:159: error: request for member ‘getRelX’ in ‘* e’, which is of non-class type ‘int’    
    wrappers/ogre/MyMouseButtonListener.h:160: error: request for member ‘getRelY’ in ‘* e’, which is of non-class type ‘int’    
    In file included from wrappers/ogre/OgreCore.cpp:47:                                                                         
    wrappers/ogre/OgreCore.h: At global scope:                                                                                   
    wrappers/ogre/OgreCore.h:388: error: ISO C++ forbids declaration of ‘EventProcessor’ with no type                            
    wrappers/ogre/OgreCore.h:388: error: expected ‘;’ before ‘*’ token                                                           
    wrappers/ogre/OgreCore.cpp: In destructor ‘OgreCore::~OgreCore()’:                                                           
    wrappers/ogre/OgreCore.cpp:270: error: ‘mpEvpro’ was not declared in this scope                                              
    wrappers/ogre/OgreCore.cpp:279: error: type ‘<type error>’ argument given to ‘delete’, expected pointer                      
    wrappers/ogre/OgreCore.cpp: In member function ‘void OgreCore::initialize(support3d::WorldObject&, unsigned int, unsigned int, bool, bool, bool, const char*, int)’:                                                                                       
    wrappers/ogre/OgreCore.cpp:1058: error: no matching function for call to ‘Ogre::Root::getSceneManager(Ogre::SceneType)’      
    /usr/include/OGRE/OgreRoot.h:375: note: candidates are: Ogre::SceneManager* Ogre::Root::getSceneManager(const Ogre::String&) const                                                                                                                         
    wrappers/ogre/OgreCore.cpp:1169: error: ‘mpEvpro’ was not declared in this scope                                             
    wrappers/ogre/OgreCore.cpp:1169: error: expected type-specifier before ‘EventProcessor’                                      
    wrappers/ogre/OgreCore.cpp:1169: error: expected ‘;’ before ‘EventProcessor’                                                 
    wrappers/ogre/OgreCore.cpp: In member function ‘int OgreCore::removeStaticPlane(const char*)’:                               
    wrappers/ogre/OgreCore.cpp:1262: error: ‘class Ogre::SceneManager’ has no member named ‘removeEntity’                        
    wrappers/ogre/OgreCore.cpp: In member function ‘Ogre::Mesh* OgreCore::getMeshFromCgKit(support3d::TriMeshGeom*, const char*)’:
    wrappers/ogre/OgreCore.cpp:1782: warning: unused variable ‘faceptr2’                                                         
    wrappers/ogre/OgreCore.cpp:1783: warning: unused variable ‘faceptr3’                                                         
    wrappers/ogre/OgreCore.cpp:1793: warning: unused variable ‘totalvertsize’                                                    
    wrappers/ogre/OgreCore.cpp:1823: warning: unused variable ‘texFaces’                                                         
    error: command 'gcc' failed with exit status 1     
    </code>

     
  • Matthias Baas
    Matthias Baas
    2009-12-06

    The Ogre viewer is not maintained anymore. It was written when Ogre was around v1.0, but the API kept changing in later releases and the guy who wrote the viewer doesn't have the time to update it anymore. Sorry.

    Matthias

     
  • No problem!

    I wrote a viewer with PyQt4, are-you interested in having it?

    It does not parse command line arguments, it is intended to use your renderer, camera, events and scene from python code.

    it is not clean yet, but I'll clean it up gradually, if you let me maintain it.

    Have you see my bug report?

    Are-you still interested in maintaining this library? I found no equivalent (scene graph, opengl-rendering, mesh imports) in python, and, aside from the fact you abuse a bit of singletons, the architecture is quite pleasant to use.

    I could help you maintaining it if you want.

    have you considered .sip to generate bindings for your C++ classes?

    Max

     
  • Matthias Baas
    Matthias Baas
    2009-12-30

    There are a few GUI bits in cgkit and they are based on wxPython, but I have no objections against having a PyQt-based viewer. I suppose, ideally, the viewer would just use whatever GUI toolkit is available. As the current viewer is quite minimal, this shouldn't be too difficult. It only needs an OpenGL window and some event handling code. Stuff like command line handling could be the same code for all viewer variants.
    One thing that might be more difficult is supporting the more "exotic" hardware like graphics tablet, space mouse, etc. I don't know how easy that is using PyQt or wxPython.

    The transform bug should be fixed by now. If you can compile cgkit from the git repository, then let me know if it works for you now.

    I haven't abandoned the package, development has just slowed down as I'm not using it on a daily basis anymore.
    If you want to contribute code, you can drop me a mail and let me know what areas you are interested in.

    I haven't considered using sip (what's the advantage over Boost.Python?), but I am looking into the possibility of reducing usage of Boost.Python and relying on ctypes instead (but that's more of a longer-term thing).

    Matthias