Controllermanager link error

Problems building or running the engine, queries about how to use features etc.
mnm23
Gnoblar
Posts: 5
Joined: Tue Mar 28, 2006 3:11 am
Location: Hamilton, Ontario

Controllermanager link error

Post by mnm23 »

Hey all, Hows it going. I had posted this originally in nxOgre, but after a few replies that didnt solve the problem was suggested to add it here. I am currently using nxOgre as my physics engine. I have compiled all the tutorials that came with nxOgre fine. I am currently trying to integrate it with a project i had done previously with ogreNewt. Right now its just a basic project. Im just trying to get the terrain going. I am getting a link error.

Code: Select all

1>Linking...
1>AnimationBlender.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall ControllerManager::~ControllerManager(void)" (__imp_??1ControllerManager@@QAE@XZ)
1>AnimationBlender.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall ControllerManager::ControllerManager(void)" (__imp_??0ControllerManager@@QAE@XZ)
1>C:\NxOgre\bin\Release\Practice.exe : fatal error LNK1120: 2 unresolved externals 

I am using current version of dagon and i am using VS8. Other libraries are OIS, nxOgre and SDL. Just to tell you how i have everything set up. All nxOgre headers come before ogre headers. I am compiling in release mode because this is how it has to be with nxOgre. I am in nxOgres bin/release. I think thats everything. Any help is much appreciated. Thanks.
User avatar
vastor
Halfling
Posts: 62
Joined: Wed Jun 08, 2005 10:23 am
Location: Germany

Post by vastor »

PhysX and Ogre both have a ControllerManager class this is a namespace conflict.

some advices to find this error:

Never use "using namespace ..." in .h-files you mostly cannot say where it is included.

If you use it in .cpp Files be sure to not use "using namespace Ogre" and "using namespace Nx" in the same file.
job: coder
project: twilight
Twilight Website
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58

Post by betajaen »

vastor wrote:PhysX and Ogre both have a ControllerManager class this is a namespace conflict.
This is automatically patched up in NxOgre.

I asked mmm23 to post here, as I and others have been trying to fix this problem for him in the NxOgre forum with no success and I think it's an Ogre or OIS issue.

Also the NxOgre tutorials work perfectly so it's something else.
mnm23
Gnoblar
Posts: 5
Joined: Tue Mar 28, 2006 3:11 am
Location: Hamilton, Ontario

Post by mnm23 »

Thanks for the quick responce. Thats one of the first things i tried. I was browsing these forums and saw some one had a similar problem with linking but they werent using nxOgre. So i went back and took out all using namespace Ogre and replaced all ogre names directly eg. Ogre::Vector3, Ogre::SceneManager, nxOgre::world ... etc. But it came back with the same error.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Triple-check that you've added OgreMain.lib to your linker input.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
vastor
Halfling
Posts: 62
Joined: Wed Jun 08, 2005 10:23 am
Location: Germany

Post by vastor »

OIS has no ControllerManager

I also use Ogre, PhysX, OIS and Raknet for me it works :P

mnm23 if your project is not too big u can send it to me and i will check it.

pm me for my email
job: coder
project: twilight
Twilight Website
User avatar
vastor
Halfling
Posts: 62
Joined: Wed Jun 08, 2005 10:23 am
Location: Germany

Post by vastor »

*gr*

next time send your solution files, took me 30 minutes to build a solution on my own.

Your error is simple :P

just include NxCharacter.lib
job: coder
project: twilight
Twilight Website
mnm23
Gnoblar
Posts: 5
Joined: Tue Mar 28, 2006 3:11 am
Location: Hamilton, Ontario

Post by mnm23 »

Sorry for not including the solution file. Your solution worked. Thanks a lot.
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58

Post by betajaen »

Ha! After all of that is was NxCharacter.lib

Programming can be really weird sometimes. :D