[Solved] linker problem

albino

07-05-2007 14:11:57

hi
i was trying to add nice player movement but after trying to add custom force and torque it gives me this error while linking

player.obj : error LNK2001: unresolved external symbol "public: void __thiscall Player::moveCallback(class OgreNewt::Body *)" (?moveCallback@Player@@QAEXPAVBody@OgreNewt@@@Z)
C:\OgreSDK\Test game\Test game\Release\Test game.exe : fatal error LNK1120: 1 unresolved externals


heres the code in my project causing that:

pbody->setCustomForceAndTorqueCallback( boost::bind(&Player::moveCallback, this,_1));


what could be the problem and the solution for that?

Solution:
i wasnt reading the code properly, i missed the class name in the function def. it was void moveCallback(OgreNewt::Body* me)
instead of void Player::moveCallback(OgreNewt::Body* me)