SanMiguel
18-08-2006 11:29:22
I can't get Stunt Playground to link...a problem with tinyXML, but I can't figure it out...
Linking...
1>msvcprtd.lib(MSVCP80D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in tinyxmld_STL.lib(tinyxml.obj)
many errors like this, also some unresolved externals in tinyxmld_STL.lib.
Don't know if I should be linking to the tinyxmld_STL.lib or the non STL version - both give me errors.
Read all the threads on link problems but can't see the answers. Everything else compiles and works OK (Ogre, newton, ogrenewt library and samples etc). Its just Stunt Playground.
Any help greatly appreciated.
SanMiguel
EDIT: BTW, using latest versions of Ogre, newton, ogrenewt etc from CVS built this week.
SanMiguel
18-08-2006 12:58:47
OK I re-read the Sticky on Stunt Playground and brought tinyXML into the project. Seems to be better-get fewer link errors-but now get:
1>Linking...
1>StuntPlaygroundApplication.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (?StreamOut@TiXmlDocument@@MBEXPAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>vehicle.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class std::basic_ostream<char,struct std::char_traits<char> > *)const " (?StreamOut@TiXmlDocument@@MBEXPAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z) referenced in function "public: __thiscall StuntPlayground::Car::MyTire::MyTire(class Ogre::SceneManager *,class Ogre::SceneNode *,class OgreNewt::Vehicle *,class Ogre::Quaternion,class Ogre::Vector3,class Ogre::Vector3,float,float,float,float,float,float,int)" (??0MyTire@Car@StuntPlayground@@QAE@PAVSceneManager@Ogre@@PAVSceneNode@4@PAVVehicle@OgreNewt@@VQuaternion@4@VVector3@4@4MMMMMMH@Z)
Any ideas?
SanMiguel
walaber
18-08-2006 16:22:06
make sure you compile TinyXML with the compiler settings set to "Multithread DLL" or "Multithread Debug DLL"
SanMiguel
21-08-2006 10:47:55
Thanks abecam (pm) and Walaber for replying to my posting...I'm getting there.
Solved the linker problems - was using tinyXML 2.5.0 Beta, and went back to the last release proper. Also, had some extranaeous library directories. Combination of which gets me past the linking stage.
Stunt Playground now links and produces a .exe. When executed though, the OGRE rendering window appears OK as normal - choosing either OpenGL or DirectX modes causes a black window to flash up which prompty disappears. I suspect its to do with the fact that
I found that abecam's edits to update the code to Dagon don't work for me. Specifically,
<from abecam's posting in the sticky>
WalaberOgreApplication->
virtual void chooseSceneManager(void)
{
// Get the SceneManager, in this case a generic one
mSceneMgr = mRoot->createSceneManager(ST_GENERIC, "ExampleSMInstance");
}
My compiler (VC8) reports that Ogre::Root::getSceneManager doesn't take 2 arguments....it doesn't like ST_GENERIC either for some reason (can't convert to String compiler error).
Also, in
void Application::createScene()
{
...
/////////////////////////////////////////////
// dirt particle system
mDirtParticles = mSceneMgr->createParticleSystem("DirtParticles", "WalaberDirtTest");
the compiler fails to recognise the method createParticleSystem as valid for the class:
'createParticleSystem' : is not a member of 'Ogre::ParticleSystemManager'
I'm using version 1.2.2 of ogre and 0.09 of ogrenewt in VC8....CVS updated today and rebuilt.
Any suggestions?
SanMiguel
abecam
21-08-2006 15:09:34
It looks like your compiler is still using the older includes, as "Ogre::Root::getSceneManager doesn't take 2 arguments" looks like the old Azathoth function... (from the Dagon's notes:
"instead of using Root::getSceneManager initially you must now call Root::createSceneManager,and you can use a type mask (e.g. ST_GENERIC as before, or some bitwise combination of types), or you can use a specific type name (e.g. "OctreeSceneManager"). You can create more than one to maintain multiple separate scenes if you want."
and also
"ParticleSystem can now only be created and retrieved via SceneManager like all other MovableObject types, using the generic createMovableObject or the specific createParticleSystem. ParticleSystemManager is still used for registering emitter / affector / renderer factories and creating templates."
).
So it seems you use the old includes without knowing it

Attack of the shadow includes!
Hope it helps!
walaber
21-08-2006 17:06:14
you will have to change the source code in order for it to compile with the latest Ogre. the changes to the SceneManager, as well as the CEGUI system constructor have been mentioned on other threads.