Mogre Compiled successfully but can not use its libs.

peterjs2011

23-11-2010 11:50:49

hi ,
I compiled mogre successfully as below url:
http://www.ogre3d.org/tikiwiki/Building+MOGRE+1.7+from+source
and the output included Mogre.dll ,OgreMain_d.lib, OgreMain_d.dll and so on.

Based our project we want to use output including OgreMain_d.lib, OgreMain_d.dll but when I compiled our project by using OgreMain_d.lib it raised link error:

4>Link:
4> Creating library D:\Debug\World.lib and object D:\Debug\World.exp
4>3DLine.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::VectorIterator<class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > > __thiscall Ogre::ManualObject::getShadowVolumeRenderableIterator(enum Ogre::ShadowTechnique,class Ogre::Light const *,class Ogre::HardwareIndexBufferSharedPtr *,bool,float,unsigned long)" (?getShadowVolumeRenderableIterator@ManualObject@Ogre@@UAE?AV?$VectorIterator@V?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@@2@W4ShadowTechnique@2@PBVLight@2@PAVHardwareIndexBufferSharedPtr@2@_NMK@Z)
4>TerrainDecal.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::VectorIterator<class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > > __thiscall Ogre::ManualObject::getShadowVolumeRenderableIterator(enum Ogre::ShadowTechnique,class Ogre::Light const *,class Ogre::HardwareIndexBufferSharedPtr *,bool,float,unsigned long)" (?getShadowVolumeRenderableIterator@ManualObject@Ogre@@UAE?AV?$VectorIterator@V?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@@2@W4ShadowTechnique@2@PBVLight@2@PAVHardwareIndexBufferSharedPtr@2@_NMK@Z)
4>3DLine.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr const &,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@ABVHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
4>TerrainDecal.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr const &,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@ABVHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
4>WaterJet.obj : error LNK2019: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr const &,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@ABVHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z) referenced in function "public: __thiscall HWG::WaterJet::WaterJet(class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0WaterJet@HWG@@QAE@PAVSceneManager@Ogre@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@11@Z)
4>WaterSpray.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr const &,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@ABVHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
4>3DLine.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::AnimableObject::initialiseAnimableDictionary(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)const " (?initialiseAnimableDictionary@AnimableObject@Ogre@@MBEXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)
4>TerrainDecal.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::AnimableObject::initialiseAnimableDictionary(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)const " (?initialiseAnimableDictionary@AnimableObject@Ogre@@MBEXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)
4>WaterJet.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::AnimableObject::initialiseAnimableDictionary(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)const " (?initialiseAnimableDictionary@AnimableObject@Ogre@@MBEXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)
4>WaterSpray.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::AnimableObject::initialiseAnimableDictionary(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)const " (?initialiseAnimableDictionary@AnimableObject@Ogre@@MBEXAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z)
4>WaterJet.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::VectorIterator<class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > > __thiscall Ogre::MovableObject::getShadowVolumeRenderableIterator(enum Ogre::ShadowTechnique,class Ogre::Light const *,class Ogre::HardwareIndexBufferSharedPtr *,bool,float,unsigned long)" (?getShadowVolumeRenderableIterator@MovableObject@Ogre@@UAE?AV?$VectorIterator@V?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@@2@W4ShadowTechnique@2@PBVLight@2@PAVHardwareIndexBufferSharedPtr@2@_NMK@Z)
4>WaterSpray.obj : error LNK2001: unresolved external symbol "public: virtual class Ogre::VectorIterator<class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > > __thiscall Ogre::MovableObject::getShadowVolumeRenderableIterator(enum Ogre::ShadowTechnique,class Ogre::Light const *,class Ogre::HardwareIndexBufferSharedPtr *,bool,float,unsigned long)" (?getShadowVolumeRenderableIterator@MovableObject@Ogre@@UAE?AV?$VectorIterator@V?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@@2@W4ShadowTechnique@2@PBVLight@2@PAVHardwareIndexBufferSharedPtr@2@_NMK@Z)
4>World.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::RenderWindow * __thiscall Ogre::Root::createRenderWindow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,unsigned int,bool,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const *)" (__imp_?createRenderWindow@Root@Ogre@@QAEPAVRenderWindow@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@II_NPBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@5@@Z) referenced in function "private: bool __thiscall HWG::CWorld::setupConfig(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?setupConfig@CWorld@HWG@@AAE_N_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H1@Z)
4>World.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::MapIterator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::multimap<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > *,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::multimap<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > *> > > > __thiscall Ogre::ConfigFile::getSectionIterator(void)" (__imp_?getSectionIterator@ConfigFile@Ogre@@QAE?AV?$MapIterator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@2@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAV?$multimap@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@2@@std@@@2@@std@@@2@XZ) referenced in function "private: bool __thiscall HWG::CWorld::setupResources(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?setupResources@CWorld@HWG@@AAE_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
4>OgreOSMScene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::SharedPtr<class std::vector<struct Ogre::FileInfo,class std::allocator<struct Ogre::FileInfo> > > __thiscall Ogre::ResourceGroupManager::findResourceFileInfo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (__imp_?findResourceFileInfo@ResourceGroupManager@Ogre@@QAE?AV?$SharedPtr@V?$vector@UFileInfo@Ogre@@V?$allocator@UFileInfo@Ogre@@@std@@@std@@@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z) referenced in function "public: bool __thiscall OSMScene::initialise(char const *,class OSMSceneCallbacks *)" (?initialise@OSMScene@@QAE_NPBDPAVOSMSceneCallbacks@@@Z)
4>OgreOSMScene.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::ResourceGroupManager::declareResource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &)" (__imp_?declareResource@ResourceGroupManager@Ogre@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00ABV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@4@@Z) referenced in function "public: void __thiscall OSMScene::declareResources(void)" (?declareResources@OSMScene@@QAEXXZ)
4>D:\Debug\World.dll : fatal error LNK1120: 8 unresolved externals
4>
4>Build FAILED.

When I use below binaries
http://sourceforge.net/projects/mogre/files/mogre/1.7.1/Mogre171VS2010Libs.7z/download
we build successfully.
I guest I compiled mogre sourcecode and ogre sourcecode by using wrong way.
But when I compiled again, the error occur.

Can you give me some suggestion?

thanks
peter

Meharin

23-11-2010 16:50:15

I looked at the repository on that wiki page (https://bitbucket.org/mstoyke/mogre17vs2010) and at the top it says this:
"OBSOLETE: I only keep this repository for reference, look at repository at bitbucket.org/mogre for up-to-date information how to create Mogre for VS2010/.NET4 - Remember to update to branch MST if you want to use this." If this is verified to be the case, can someone update the wiki?

In case this helps, here's my success story from the last week:

I haven't tracked down which set of instructions is accurate, but in the last week I just successfully compiled from source using these instructions:
https://bitbucket.org/mogre/mogre/src/tip/BUILD

I only succeeded with the debug build (my release mode might be good too, but I might have to be consistent to use all release dll's or something.)

HTH

--
My environment: MOgre using Ogre 1.7.1 version 58266f25ccd2, PhysX, WPF, Lidgren networking, and soon MOgreFreeSL, MOIS

peterjs2011

25-11-2010 05:15:32

hi meharin,

I get it and I compiled successfully meanwhile I can use its libs.

thanks

Beauty

18-12-2010 17:14:43

Meharin, it's interesting to see that you are member of our forum for 2.5 years now and still wrote only 7 posts.
Thanks for reading our topics and your help for this problem :D

can someone update the wiki?
Thanks for you answer. I didn't recognize this fact before.
Now I updated the wiki page Building MOGRE 1.7 from source and hope this will avoid trouble.
At this point I want to say thanks to user manski who studied the Mogre wrapping/building details and wrote the useful documentation. (This was a dark point in the past when the Mogre author was away for over one year and nearly nobody did understand the wrapping process.)

Beauty

18-12-2010 17:25:27

Meharin, in your signature I read that you use WPF for the GUI.
This is a very interesting fact.
In my applications I never used WPF, but I saw it on other applications and it contains great features.
In the past I read about Mogre and WPF. It's possible to use both together, but there are still problems.
Here is the main discussion thread about Mogre and WPF:
https://www.ogre3d.org/addonforums/view ... =8&t=13316

It would be great if you can read this topic (it not too long!) and then write your personal feedback there (not in this thread). I would be really happy to read your experiences.