Linking fun; What am I missing?

Pakaffy

23-06-2009 04:38:02

Error 2 fatal error LNK1120: 1 unresolved externals
Error 1 error LNK2001: unresolved external symbol "public: virtual void __thiscall Ogre::MovablePlane::_Init_CLRObject(void)" (?_Init_CLRObject@MovablePlane@Ogre@@UAEXXZ) main.obj



Hmm...what am I forgetting to link for this?

spacegaier

23-06-2009 07:54:18

Ogre::MovablePlane::_Init_CLRObject
Sounds as if something of Ogre is missing in the linker?!? You could comment everything out in your application that belongs to NxOgre and check whether the error persists.

If yes -> Ogre linker problem -> make sure you linked to everything needed (see the tutorials for more information or search the main forum).

If not -> NxOgre linker problem -> post again and tell us what you linked to.

Pakaffy

23-06-2009 12:48:17

It is most definitely something to do with Ogre. I've got all the dependencies per the tutorials and then some, I think;

NxOgre_Debug.lib CEGUIBase_d.lib OgreGUIRenderer_d.lib RenderSystem_Direct3D9_d.lib NxOgreOGRE3D_debug.lib CEGUIBase_d.lib ws2_32.lib newton.lib ceguibase_d.lib kf.lib kgl.lib tinyxmld.lib ogreguirenderer_d.lib NxOgreOGRE3D_Debug.lib PhysXLoader.lib NxCooking.lib NxCharacter.lib OgreMain_d.lib OIS_d.lib

This was working a few nights ago, dammit.

betajaen

23-06-2009 13:37:44

I always find the VS compiler a little strange now and again, try cleaning the solution (and even deleting the Debug/Release directories) and try a fresh compile.

But a few notes;

- Just to make things a little simpler; if your using BloodyMess you don't have to link to the PhysX libs or reference it's headers.
- You've also got newton in there too, which doesn't seem to be needed either.

Pakaffy

23-06-2009 15:24:46

Hmm, thankyou for that. Unfortunately the error persists. Would you recommend reinstalling physx/mess/cake or even just VS? I am reaching a rather desperate stage where I need to get this done. Is there a place I can download a base project with all this set up? If that still doesn't work then I will know that it at least isn't something I haven't done.

betajaen

23-06-2009 16:42:57

It seems to be related to Ogre. If you wish you could post your project zip here (just the source - no media) otherwise if it's sensitive - just post a full copy of the settings.

For a frame of reference, these are the correct settings to use Ogre/Bloody Mess together (it's from Cake debug);


Configuration Properties, General, ConfigurationType = "Application(.exe)"
Configuration Properties, General, Use of MFC = "Use Standard Window Libraries"
Configuration Properties, General, Use of ATL = "Not using ATL"
Configuration Properties, General, Character Set = "Use Multi-Byte Character Set"

Configuration Properties, C/C++, General, Additional Include Directories = "$(SolutionDir)\..\..\..\BloodyMess\sdk\";"$(OGRE_HOME)\include\";"$(OGRE_HOME)\..\Dependencies\include\"

Configuration Properties, C/C++, Code Generation, Runtime Library = "Multi-threaded Debug DLL (/MDd)"

Configuration Properties, Linker, General, Additional Library Directories = ""$(SolutionDir)\..\..\..\BloodyMess\sdk\";"$(OGRE_HOME)\..\lib\";"$(OGRE_HOME)\..\Dependencies\lib\Debug"
Configuration Properties, Linker, Input, Additional Dependencies = "NxOgre_Debug.lib NxOgreOGRE3D_Debug.lib OgreMain_d.lib OIS_d.lib"
Configuration Properties, Linker, Input, Ignore All Default Libraries = "No"
Configuration Properties, Linker, Input, Ignore Specific Library = Blank
Configuration Properties, Linker, System, SubSystem = "Console" OR "Windows"


Hope this helps.

Also it may be worth re-compiling all of Ogre again (then NxOgre).

Pakaffy

24-06-2009 06:56:30

All working!Thank you for your help!