Linking errors in project using OgreNewt 2.

ipersite

31-10-2011 20:10:21

Hi, I've been using OGRE for my 3D projects for 2 years. In my last project I need physics so the first thing I thought was "oh good, let's use Newton dynamics". So I started downloading the library and the Ogre C++ wrapper (OgreNewt 2). I compiled everything, but when I try to link my final program to OgreNewt ecc. the linker gives me that:
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::CustomKinematicController(NewtonBody const*, dVector const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `NewtonCustomJoint::operator delete(void*)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetPickMode(int)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomUpVector::SetPinDir(dVector const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::EnableLimits(bool)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::CustomHinge(dMatrix const&, NewtonBody const*, NewtonBody const*)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::SetLimis(float, float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::GetPlayerStairHeight() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetTargetMatrix(dMatrix const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomSlider::CustomSlider(dMatrix const&, NewtonBody const*, NewtonBody const*)'
/usr/local/lib/libOgreNewt.so: undefined reference to `NewtonCustomJoint::GetBody1() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomSlider::SetLimis(float, float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `Ogre::Terrain::getMinHeight() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `Ogre::Terrain::getMaxHeight() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomSlider::EnableLimits(bool)'
/usr/local/lib/libOgreNewt.so: undefined reference to `NewtonCustomJoint::GetBody0() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::CustomPlayerController(dMatrix const&, NewtonBody const*, float, float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::GetJointOmega() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomBallAndSocket::CustomBallAndSocket(dMatrix const&, NewtonBody const*, NewtonBody const*)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::GetJointAngle() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomHinge::GetPinAxis() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `dgGrammSchmidt(dVector const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::GetVelocity(float&, float&, float&) const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetTargetRotation(dQuaternion const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `Ogre::Terrain::getHeightAtPoint(long, long) const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetMaxLinearFriction(float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetMaxAngularFriction(float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::SetVelocity(float, float, float)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::GetSensorShape() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `Ogre::Terrain::getWorldSize() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::SetTargetPosit(dVector const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `NewtonCustomJoint::operator new(unsigned long)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomKinematicController::GetTargetMatrix() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomUpVector::CustomUpVector(dVector const&, NewtonBody*)'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::GetStairStepShape() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomPlayerController::GetPlayerHeight() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `NewtonCustomJoint::GetJoint() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `dMatrix::dMatrix(dQuaternion const&, dVector const&)'
/usr/local/lib/libOgreNewt.so: undefined reference to `Ogre::Terrain::getSize() const'
/usr/local/lib/libOgreNewt.so: undefined reference to `CustomUserBlank::CustomUserBlank(unsigned int, NewtonBody const*, NewtonBody const*)'
collect2: ld returned 1 exit status



g++ is called by CMake as:
/usr/bin/c++ -O2 -g CMakeFiles/OgreApp.dir/BaseApplication.cpp.o CMakeFiles/OgreApp.dir/TutorialApplication.cpp.o -o dist/bin/OgreApp -rdynamic -L/home/cesco/Scrivania/3DApps/3Dapp/../newton-dynamics-read-only/packages/linux64 /usr/local/lib/libOgreMain.so -lboost_thread-mt -lboost_date_time-mt /usr/local/lib/libOgreTerrain.so -lOIS -lOgreNewt -lNewton -Wl,-rpath,/home/cesco/Scrivania/3DApps/3Dapp/../newton-dynamics-read-only/packages/linux64:/usr/local/lib

I'm in trouble! Does someone know how to help me?

Thanks in advance.

Francesco.

KATO2

17-11-2011 00:22:57

ipersite, i hope the information is not too late.

I use the following flags to link the aplicactions developed in OgreNewt and Ogre3D.

-lOgreMain -lNewton -lOgreNewt -ldJointLibrary -ldMath -lOgreTerrain

Be sure you use this flags in same orden.