PagedGeometry Unresolved Link errors. Help!

strangelasagne

15-09-2011 00:21:20

Hello

I am using Ogre 1.7.3 source build. I have been trying to compile PagedGeometry against it for days. PagedGeometry 1.1.1 keeps giving me that getlodIndex in Batchedgeometry.cpp not in Ogre::Material error. PagedGeometry 1.1.0 was giving me some other errors. Sorry my head is heated up I dont even remember what those errors were. I have tried to both compile the .sln to generate libraries (cmake and vs08 I found somewhere online) and add the source files directly to my project. No luck.

Than I compile PagedGeometry 1.1.3 and I finally managed to get the libs! I compiled only zerocheck, pagedgeometry, package and INSTALL though. All examples failed but 2 succeeded (I have happily assumed these two were pagedgeometry and zerocheck).
Now I get this.

I get this when I add in the pagedgeometry source files directly to my project
1>------ Build started: Project: ZooSceneLoad, Configuration: Debug Win32 ------
1> WindBatchedGeometry.cpp
1> WindBatchPage.cpp
1> BatchedGeometry.cpp
1> Generating Code...
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: __thiscall Forests::PagedGeometry::~PagedGeometry(void)" (??1PagedGeometry@Forests@@QAE@XZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::setPageLoader(class Forests::PageLoader *)" (?setPageLoader@PagedGeometry@Forests@@QAEXPAVPageLoader@2@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::setCamera(class Ogre::Camera *)" (?setCamera@PagedGeometry@Forests@@QAEXPAVCamera@Ogre@@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::setPageSize(float)" (?setPageSize@PagedGeometry@Forests@@QAEXM@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::setInfinite(void)" (?setInfinite@PagedGeometry@Forests@@QAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::setBounds(struct Ogre::TRect<float>)" (?setBounds@PagedGeometry@Forests@@QAEXU?$TRect@M@Ogre@@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::removeDetailLevels(void)" (?removeDetailLevels@PagedGeometry@Forests@@QAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::update(void)" (?update@PagedGeometry@Forests@@QAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::reloadGeometry(void)" (?reloadGeometry@PagedGeometry@Forests@@QAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::reloadGeometryPage(class Ogre::Vector3 const &)" (?reloadGeometryPage@PagedGeometry@Forests@@QAEXABVVector3@Ogre@@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::PagedGeometry::reloadGeometryPages(class Ogre::Vector3 const &,float)" (?reloadGeometryPages@PagedGeometry@Forests@@QAEXABVVector3@Ogre@@M@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "protected: void __thiscall Forests::PagedGeometry::_addDetailLevel(class Forests::GeometryPageManager *,float,float)" (?_addDetailLevel@PagedGeometry@Forests@@IAEXPAVGeometryPageManager@2@MM@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: __thiscall Forests::GeometryPageManager::GeometryPageManager(class Forests::PagedGeometry *)" (??0GeometryPageManager@Forests@@QAE@PAVPagedGeometry@1@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: __thiscall Forests::GeometryPageManager::~GeometryPageManager(void)" (??1GeometryPageManager@Forests@@QAE@XZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::GeometryPageManager::update(unsigned long,class Ogre::Vector3 &,class Ogre::Vector3 &,bool &,class Forests::GeometryPageManager *)" (?update@GeometryPageManager@Forests@@QAEXKAAVVector3@Ogre@@0AA_NPAV12@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::GeometryPageManager::reloadGeometry(void)" (?reloadGeometry@GeometryPageManager@Forests@@QAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::GeometryPageManager::reloadGeometryPage(class Ogre::Vector3 const &)" (?reloadGeometryPage@GeometryPageManager@Forests@@QAEXABVVector3@Ogre@@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: void __thiscall Forests::GeometryPageManager::reloadGeometryPages(class Ogre::Vector3 const &,float)" (?reloadGeometryPages@GeometryPageManager@Forests@@QAEXABVVector3@Ogre@@M@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "private: void __thiscall Forests::GeometryPageManager::_loadPage(class Forests::GeometryPage *)" (?_loadPage@GeometryPageManager@Forests@@AAEXPAVGeometryPage@2@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "private: void __thiscall Forests::GeometryPageManager::_unloadPage(class Forests::GeometryPage *)" (?_unloadPage@GeometryPageManager@Forests@@AAEXPAVGeometryPage@2@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "private: void __thiscall Forests::GeometryPageManager::_unloadPageDelayed(class Forests::GeometryPage *)" (?_unloadPageDelayed@GeometryPageManager@Forests@@AAEXPAVGeometryPage@2@@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "private: void __thiscall Forests::GeometryPageManager::_scrollGridPages(int,int)" (?_scrollGridPages@GeometryPageManager@Forests@@AAEXHH@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: __thiscall Forests::GeometryPage::GeometryPage(void)" (??0GeometryPage@Forests@@QAE@XZ) already defined in ITutorial02.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: virtual void __thiscall Forests::GeometryPage::addEntityToBoundingBox(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &)" (?addEntityToBoundingBox@GeometryPage@Forests@@UAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1@Z) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: virtual class Ogre::AxisAlignedBox const & __thiscall Forests::GeometryPage::getBoundingBox(void)" (?getBoundingBox@GeometryPage@Forests@@UAEABVAxisAlignedBox@Ogre@@XZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: virtual void __thiscall Forests::GeometryPage::clearBoundingBox(void)" (?clearBoundingBox@GeometryPage@Forests@@UAEXXZ) already defined in PagedGeometry.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: __thiscall Forests::BatchPage::BatchPage(void)" (??0BatchPage@Forests@@QAE@XZ) already defined in ITutorial02.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual __thiscall Forests::BatchPage::~BatchPage(void)" (??1BatchPage@Forests@@UAE@XZ) already defined in BatchPage.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual void __thiscall Forests::BatchPage::addEntity(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &,class Ogre::ColourValue const &)" (?addEntity@BatchPage@Forests@@UAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1ABVColourValue@4@@Z) already defined in BatchPage.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual void __thiscall Forests::BatchPage::build(void)" (?build@BatchPage@Forests@@UAEXXZ) already defined in BatchPage.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual void __thiscall Forests::BatchPage::removeEntities(void)" (?removeEntities@BatchPage@Forests@@UAEXXZ) already defined in BatchPage.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual void __thiscall Forests::BatchPage::setVisible(bool)" (?setVisible@BatchPage@Forests@@UAEX_N@Z) already defined in BatchPage.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: virtual void __thiscall Forests::BatchPage::setFade(bool,float,float)" (?setFade@BatchPage@Forests@@UAEX_NMM@Z) already defined in BatchPage.obj
1>BatchPage.obj : error LNK2019: unresolved external symbol "public: void __thiscall Forests::BatchedGeometry::addEntity(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &,class Ogre::ColourValue const &)" (?addEntity@BatchedGeometry@Forests@@QAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1ABVColourValue@4@@Z) referenced in function "public: virtual void __thiscall Forests::BatchPage::addEntity(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &,class Ogre::ColourValue const &)" (?addEntity@BatchPage@Forests@@UAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1ABVColourValue@4@@Z)
1>BatchPage.obj : error LNK2019: unresolved external symbol "public: class Ogre::MapIterator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Forests::BatchedGeometry::SubBatch *,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 Forests::BatchedGeometry::SubBatch *> > > > __thiscall Forests::BatchedGeometry::getSubBatchIterator(void)const " (?getSubBatchIterator@BatchedGeometry@Forests@@QBE?AV?$MapIterator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVSubBatch@BatchedGeometry@Forests@@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@@PAVSubBatch@BatchedGeometry@Forests@@@std@@@2@@std@@@Ogre@@XZ) referenced in function "public: virtual void __thiscall Forests::BatchPage::build(void)" (?build@BatchPage@Forests@@UAEXXZ)
myapp.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


and I get this when I just add the libs and paths in the project properties. Made sure the lib paths, include directories paths and libs specified in linker->input.
1>------ Build started: Project: ZooSceneLoad, Configuration: Debug Win32 ------
1>PagedGeometry_d.lib(PagedGeometry.obj) : error LNK2005: "public: __thiscall Forests::GeometryPage::GeometryPage(void)" (??0GeometryPage@Forests@@QAE@XZ) already defined in ITutorial02.obj
1>PagedGeometry_d.lib(BatchPage.obj) : error LNK2005: "public: __thiscall Forests::BatchPage::BatchPage(void)" (??0BatchPage@Forests@@QAE@XZ) already defined in ITutorial02.obj
1>PagedGeometry_d.lib(ImpostorPage.obj) : error LNK2005: "public: __thiscall Forests::ImpostorPage::ImpostorPage(void)" (??0ImpostorPage@Forests@@QAE@XZ) already defined in ITutorial02.obj
1>ITutorial02.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Forests::BatchPage::init(class Forests::PagedGeometry *)" (?init@BatchPage@Forests@@UAEXPAVPagedGeometry@2@@Z)
1>ITutorial02.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall Forests::ImpostorPage::init(class Forests::PagedGeometry *)" (?init@ImpostorPage@Forests@@UAEXPAVPagedGeometry@2@@Z)
myapp.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Edit: I have switched back to adding the pagedgeometry source to my project. While doing this, I removed the PagedGeometry_d.lib and PagedGeometry.lib from Linker->Input in my project properties. Now I get this

1>BatchPage.obj : error LNK2019: unresolved external symbol "public: void __thiscall Forests::BatchedGeometry::addEntity(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &,class Ogre::ColourValue const &)" (?addEntity@BatchedGeometry@Forests@@QAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1ABVColourValue@4@@Z) referenced in function "public: virtual void __thiscall Forests::BatchPage::addEntity(class Ogre::Entity *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &,class Ogre::ColourValue const &)" (?addEntity@BatchPage@Forests@@UAEXPAVEntity@Ogre@@ABVVector3@4@ABVQuaternion@4@1ABVColourValue@4@@Z)
1>BatchPage.obj : error LNK2019: unresolved external symbol "public: class Ogre::MapIterator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Forests::BatchedGeometry::SubBatch *,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 Forests::BatchedGeometry::SubBatch *> > > > __thiscall Forests::BatchedGeometry::getSubBatchIterator(void)const " (?getSubBatchIterator@BatchedGeometry@Forests@@QBE?AV?$MapIterator@V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVSubBatch@BatchedGeometry@Forests@@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@@PAVSubBatch@BatchedGeometry@Forests@@@std@@@2@@std@@@Ogre@@XZ) referenced in function "public: virtual void __thiscall Forests::BatchPage::build(void)" (?build@BatchPage@Forests@@UAEXXZ)
1>ITutorial02.obj : error LNK2019: unresolved external symbol "public: __thiscall Forests::BatchPage::BatchPage(void)" (??0BatchPage@Forests@@QAE@XZ) referenced in function "public: void __thiscall Forests::GeometryPageManager::initPages<class Forests::BatchPage>(struct Ogre::TRect<float> const &,class Ogre::Any const &,unsigned int)" (??$initPages@VBatchPage@Forests@@@GeometryPageManager@Forests@@QAEXABU?$TRect@M@Ogre@@ABVAny@3@I@Z)
1>ITutorial02.obj : error LNK2019: unresolved external symbol "public: __thiscall Forests::ImpostorPage::ImpostorPage(void)" (??0ImpostorPage@Forests@@QAE@XZ) referenced in function "public: void __thiscall Forests::GeometryPageManager::initPages<class Forests::ImpostorPage>(struct Ogre::TRect<float> const &,class Ogre::Any const &,unsigned int)" (??$initPages@VImpostorPage@Forests@@@GeometryPageManager@Forests@@QAEXABU?$TRect@M@Ogre@@ABVAny@3@I@Z)

Where do I go from here? Anyone's 2 cents are welcome. I have been stuck on this for about 24 hrs without sleep. I am ready to try anything here.

tod

15-09-2011 12:46:46

My expert advice is to get some sleep. :lol:
PagedGeometry 1.1.0 should build with Ogre 1.7, I use them together. PG is a separate project compiled as a static lib.
So first build PG, the include all headers and libs in your project.