Linking problems with my project

Liens

03-11-2008 14:11:16

Hi, sorry to post again so soon, but I'm having problems with what files I should be doing the linking thing to. I've been coding for a while but I'm a C++ newb, all this linking stuff is pretty frustrating but I'm kinda getting it down.

I've built caelum successfully and I can run the caelum demos. (Version 0.3 caelum, msvs 2008)

So far I've got all this stuff for caelum linked:

Under Includes:
E:\OGRE_1.6\AddOns\Caelum-0.3.0\main\include

Under Libarys:
E:\OGRE_1.6\AddOns\Caelum-0.3.0\lib

Under Source Files:
E:\OGRE_1.6\AddOns\Caelum-0.3.0\main\src


But whenever I try to build, it gives me this:

1>------ Build started: Project: The_Pearl, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>The_Pearl.cpp
1>Linking...
1>LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported; ignored
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::SolarSystemModel::setObserverLatitude(class Ogre::Degree)" (__imp_?setObserverLatitude@SolarSystemModel@caelum@@QAEXVDegree@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::SolarSystemModel::setObserverLongitude(class Ogre::Degree)" (__imp_?setObserverLongitude@SolarSystemModel@caelum@@QAEXVDegree@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class caelum::SolarSystemModel * __thiscall caelum::CaelumSystem::getSolarSystemModel(void)const " (__imp_?getSolarSystemModel@CaelumSystem@caelum@@QBEPAVSolarSystemModel@2@XZ) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::UniversalClock::setGregorianDateTime(int,int,int,int,int,double)" (__imp_?setGregorianDateTime@UniversalClock@caelum@@QAEXHHHHHN@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class caelum::UniversalClock * __thiscall caelum::CaelumSystem::getUniversalClock(void)const " (__imp_?getUniversalClock@CaelumSystem@caelum@@QBEPAVUniversalClock@2@XZ) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::ImageStarfield::setInclination(class Ogre::Degree)" (__imp_?setInclination@ImageStarfield@caelum@@QAEXVDegree@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class caelum::ImageStarfield * __thiscall caelum::CaelumSystem::getImageStarfield(void)const " (__imp_?getImageStarfield@CaelumSystem@caelum@@QBEPAVImageStarfield@2@XZ) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::BaseSkyLight::setAutoDisable(bool)" (__imp_?setAutoDisable@BaseSkyLight@caelum@@QAEX_N@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::BaseSkyLight::setSpecularMultiplier(class Ogre::ColourValue const &)" (__imp_?setSpecularMultiplier@BaseSkyLight@caelum@@QAEXABVColourValue@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::BaseSkyLight::setDiffuseMultiplier(class Ogre::ColourValue const &)" (__imp_?setDiffuseMultiplier@BaseSkyLight@caelum@@QAEXABVColourValue@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::BaseSkyLight::setAmbientMultiplier(class Ogre::ColourValue const &)" (__imp_?setAmbientMultiplier@BaseSkyLight@caelum@@QAEXABVColourValue@Ogre@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class caelum::BaseSkyLight * __thiscall caelum::CaelumSystem::getSun(void)const " (__imp_?getSun@CaelumSystem@caelum@@QBEPAVBaseSkyLight@2@XZ) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::CaelumSystem::setSceneFogDensityMultiplier(double)" (__imp_?setSceneFogDensityMultiplier@CaelumSystem@caelum@@QAEXN@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::CaelumSystem::setManageSceneFog(bool)" (__imp_?setManageSceneFog@CaelumSystem@caelum@@QAEX_N@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall caelum::CaelumSystem::CaelumSystem(class Ogre::Root *,class Ogre::SceneManager *,enum caelum::CaelumSystem::CaelumComponent,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0CaelumSystem@caelum@@QAE@PAVRoot@Ogre@@PAVSceneManager@3@W4CaelumComponent@01@_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall The_PearlFrameListener::The_PearlFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *)" (??0The_PearlFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@@Z)
1>The_Pearl.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > caelum::RESOURCE_GROUP_NAME" (__imp_?RESOURCE_GROUP_NAME@caelum@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)
1>The_Pearl.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall caelum::CaelumSystem::frameStarted(struct Ogre::FrameEvent const &)" (?frameStarted@CaelumSystem@caelum@@MAE_NABUFrameEvent@Ogre@@@Z)
1>The_Pearl.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall caelum::CaelumSystem::preViewportUpdate(struct Ogre::RenderTargetViewportEvent const &)" (?preViewportUpdate@CaelumSystem@caelum@@MAEXABURenderTargetViewportEvent@Ogre@@@Z)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall caelum::CaelumSystem::shutdown(bool)" (__imp_?shutdown@CaelumSystem@caelum@@QAEX_N@Z) referenced in function "public: virtual __thiscall The_PearlFrameListener::~The_PearlFrameListener(void)" (??1The_PearlFrameListener@@UAE@XZ)
1>The_Pearl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall caelum::CaelumSystem::~CaelumSystem(void)" (__imp_??1CaelumSystem@caelum@@UAE@XZ) referenced in function "public: virtual void * __thiscall caelum::CaelumSystem::`scalar deleting destructor'(unsigned int)" (??_GCaelumSystem@caelum@@UAEPAXI@Z)
1>bin\Debug\The_Pearl.exe : fatal error LNK1120: 20 unresolved externals
1>Build log was saved at "file://e:\OGRE_1.6\The_Pearl\The_Pearl\obj\Debug\BuildLog.htm"
1>The_Pearl - 21 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Is there some way to tell what files it's even asking for?

sensius

04-11-2008 03:32:29

To use Caelum in your project, you don't have to compile Caelum *.cpp files with your project files. Just do this:
+ make sure include path points to the folder where Caelum *.h files are located.
+ add Caelum.lib to link input (you get Caelum.lib when compile Caelum from source).
+ Copy Caelum.dll to the folder where your exe file located if you want to run your application.

Liens

04-11-2008 10:02:03

Oh thanks, I didn't add the .lib to the links. Thanks for the help