User forums > Using Code::Blocks

Problems linking libraries

<< < (5/6) > >>

Joker:
if you notice, VC is on the default setting (Append settings to project default). I still get the link errors, reguardless. I was desperate, and its not that :-P

I took the screeny after messing with pretty much every setting trying to get it to work.

mandrav:
You know, if you 'd post the build log you might get more helpful replies. A simple "I get unresolved ogre symbols" means nothing...
And before posting your build log, go to "Settings->Compiler->[select compiler]->Other" and set "Compiler logging" to full command-line.

Joker:
VC build log:

--- Quote ---Project   : OGRE_Sample
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : E:\Coding\
--------------------------------------------------------------------------------
Switching to target: Debug
cl.exe /nologo   /GX /Zi /DDEBUG /D_DEBUG    /IE:\Coding\OgreSDK\include /IE:\Coding\OgreSDK\include\opt /IE:\Coding\OgreSDK\Samples\include  /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" /c main.cpp /FoDebug\.objs\main.obj
main.cpp
link.exe /nologo   /LIBPATH:E:\Coding\OgreSDK\lib /LIBPATH:E:\Coding\OgreSDK\lib\opt\debug  /LIBPATH:"C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib" /out:Debug\ogre_sample.exe   user32.lib kernel32.lib gdi32.lib opengl32.lib OgreMain_d.lib  Debug\.objs\main.obj     
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Ogre::Exception::getFullDescription(void)const " (__imp_?getFullDescription@Exception@Ogre@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function $L130547
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Ogre::Root::Root(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 &)" (__imp_??0Root@Ogre@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00@Z) referenced in function "protected: virtual bool __thiscall ExampleApplication::setup(void)" (?setup@ExampleApplication@@MAE_NXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::RenderWindow * __thiscall Ogre::Root::initialise(bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?initialise@Root@Ogre@@QAEPAVRenderWindow@2@_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "protected: virtual bool __thiscall ExampleApplication::configure(void)" (?configure@ExampleApplication@@MAE_NXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::Overlay * __thiscall Ogre::OverlayManager::getByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?getByName@OverlayManager@Ogre@@QAEPAVOverlay@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall ExampleFrameListener::ExampleFrameListener(class Ogre::RenderWindow *,class Ogre::Camera *,bool,bool)" (??0ExampleFrameListener@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@_N2@Z)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Ogre::StringConverter::toString(class Ogre::Vector3 const &)" (__imp_?toString@StringConverter@Ogre@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVVector3@2@@Z) referenced in function "public: virtual bool __thiscall ExampleFrameListener::processUnbufferedKeyInput(struct Ogre::FrameEvent const &)" (?processUnbufferedKeyInput@ExampleFrameListener@@UAE_NABUFrameEvent@Ogre@@@Z)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Ogre::StringConverter::toString(class Ogre::Quaternion const &)" (__imp_?toString@StringConverter@Ogre@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVQuaternion@2@@Z) referenced in function "public: virtual bool __thiscall ExampleFrameListener::processUnbufferedKeyInput(struct Ogre::FrameEvent const &)" (?processUnbufferedKeyInput@ExampleFrameListener@@UAE_NABUFrameEvent@Ogre@@@Z)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall Ogre::RenderTarget::getDebugText(void)const " (__imp_?getDebugText@RenderTarget@Ogre@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "protected: void __thiscall ExampleFrameListener::updateStats(void)" (?updateStats@ExampleFrameListener@@IAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Ogre::StringConverter::toString(unsigned int,unsigned short,char,int)" (__imp_?toString@StringConverter@Ogre@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IGDH@Z) referenced in function "protected: void __thiscall ExampleFrameListener::updateStats(void)" (?updateStats@ExampleFrameListener@@IAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Ogre::StringConverter::toString(unsigned long,unsigned short,char,int)" (__imp_?toString@StringConverter@Ogre@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KGDH@Z) referenced in function "protected: void __thiscall ExampleFrameListener::updateStats(void)" (?updateStats@ExampleFrameListener@@IAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Ogre::StringConverter::toString(float,unsigned short,unsigned short,char,int)" (__imp_?toString@StringConverter@Ogre@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MGGDH@Z) referenced in function "protected: void __thiscall ExampleFrameListener::updateStats(void)" (?updateStats@ExampleFrameListener@@IAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Ogre::OverlayElement * __thiscall Ogre::OverlayManager::getOverlayElement(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (__imp_?getOverlayElement@OverlayManager@Ogre@@QAEPAVOverlayElement@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "protected: void __thiscall ExampleFrameListener::updateStats(void)" (?updateStats@ExampleFrameListener@@IAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::ResourceGroupManager::addResourceLocation(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 &,bool)" (__imp_?addResourceLocation@ResourceGroupManager@Ogre@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00_N@Z) referenced in function "protected: virtual void __thiscall ExampleApplication::setupResources(void)" (?setupResources@ExampleApplication@@MAEXXZ)
main.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 "protected: virtual void __thiscall ExampleApplication::setupResources(void)" (?setupResources@ExampleApplication@@MAEXXZ)
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::ConfigFile::load(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_?load@ConfigFile@Ogre@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z) referenced in function "protected: virtual void __thiscall ExampleApplication::setupResources(void)" (?setupResources@ExampleApplication@@MAEXXZ)
main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME" (__imp_?DEFAULT_RESOURCE_GROUP_NAME@ResourceGroupManager@Ogre@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
Debug\ogre_sample.exe : fatal error LNK1120: 15 unresolved externals
Process terminated with status 1 (0 minutes, 5 seconds)
16 errors, 0 warnings
 
--- End quote ---
gcc is basically the same thing. paths are correct, it is passing the proper OgreMain lib to the linker, its just not linking it.
I'm begining to suspect its ogre..

mandrav:
Does it happen with the release build too, or only the debug?

Joker:
both, using either compiler.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version