Problems compiling the OgreNewt lib with Code::Blocks

McNugget

03-06-2007 14:36:53

Hi there,

I compiled the lib and everything seemed to be ok. Now I'm at the point where I want to create the OgreNewtListener within my project and now I get the following message when I try to compile it:

:: === OGRE_Sample, Release ===
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `Ogre::StringConverter::toString(float, unsigned short, unsigned short, char, std::_Ios_Fmtflags)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `Ogre::LogManager::logMessage(std::string const&, Ogre::LogMessageLevel, bool)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `Ogre::StringConverter::toString(int, unsigned short, char, std::_Ios_Fmtflags)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `Ogre::LogManager::logMessage(std::string const&, Ogre::LogMessageLevel, bool)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `OIS::InputManager::createInputSystem(std::multimap<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >&)'
:OgreNewt_BasicFrameListener.cpp:: undefined reference to `OIS::InputManager::createInputObject(OIS::Type, bool, std::string const&)'
:OgreNewt_Debugger.cpp:: undefined reference to `Ogre::ManualObject::ManualObject(std::string const
:: === Build finished: 9 errors, 0 warnings ===


I'm wondering if I made something wrong while compiling the lib.... well however. I use the newest Ogre-Code::Blocks version with the new OgreNewt scources but it seems that the library is not working at this point when I compile it by myself.

Could someone please send me a copy of his windows-compatible OgreNewt.lib / libOgreNewt.a?
timo.birnschein@informatik.uni-oldenburg.de

That would help me a lott!

Thank,
Timo

McNugget

03-06-2007 15:02:58

The interesting thing about the problem is that I have no errors while compiling the lib. Everything seems to be correct:

-------------- Build: Release in OgreNewt ---------------
Compiling: ..\OgreNewt_Main\src\OgreNewt_BasicFrameListener.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_BasicJoints.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_Body.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_Collision.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp: In constructor `OgreNewt::CollisionPrimitives::TreeCollision::TreeCollision(const OgreNewt::World*, Ogre::SceneNode*, bool)':
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:282: warning: 'i_Longptr' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:283: warning: 'i_Shortptr' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp: In constructor `OgreNewt::CollisionPrimitives::TreeCollision::TreeCollision(const OgreNewt::World*, Ogre::SceneNode*, bool)':
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:282: warning: 'i_Longptr' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:283: warning: 'i_Shortptr' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp: In constructor `OgreNewt::CollisionPrimitives::ConvexHull::ConvexHull(const OgreNewt::World*, Ogre::SceneNode*, const Ogre::Quaternion&, const Ogre::Vector3&)':
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:142: warning: 'p_elem' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:144: warning: 'v_count' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp: In constructor `OgreNewt::CollisionPrimitives::ConvexHull::ConvexHull(const OgreNewt::World*, Ogre::SceneNode*, const Ogre::Quaternion&, const Ogre::Vector3&)':
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:142: warning: 'p_elem' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:144: warning: 'v_count' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp: In member function `void OgreNewt::CollisionPrimitives::TreeCollisionSceneParser::_parseNode(Ogre::SceneNode*, const Ogre::Quaternion&, const Ogre::Vector3&)':
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:540: warning: 'i_Longptr' might be used uninitialized in this function
..\OgreNewt_Main\src\OgreNewt_CollisionPrimitives.cpp:541: warning: 'i_Shortptr' might be used uninitialized in this function
Compiling: ..\OgreNewt_Main\src\OgreNewt_ContactCallback.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_Debugger.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_Joint.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_MaterialID.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_MaterialPair.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_RayCast.cpp
..\OgreNewt_Main\src\OgreNewt_RayCast.cpp: In member function `OgreNewt::BasicRaycast::BasicRaycastInfo OgreNewt::BasicRaycast::getInfoAt(int) const':
..\OgreNewt_Main\src\OgreNewt_RayCast.cpp:96: warning: comparison between signed and unsigned integer expressions
Compiling: ..\OgreNewt_Main\src\OgreNewt_Tools.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_TreeCollisionSerializer.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_Vehicle.cpp
Compiling: ..\OgreNewt_Main\src\OgreNewt_World.cpp
Linking static library: libOgreNewt.a
ar.exe: creating libOgreNewt.a
Process terminated with status 0 (1 minutes, 8 seconds)
0 errors, 11 warnings

McNugget

03-06-2007 17:33:22

The problem seems to be solved now. I used the old include files from Ogre 1.2.1, to compile OgreNewt, instead of using the Ogre 1.4 includes.

Now the lib is not just 300kb, its 80MB now. Well I don't really know if that is correct, but it seems to link correctly now.