Linking errors


15-05-2008 19:43:26


I have downloaded the OgreAL SVN and set it up as instructed on the installation post, but I was unable to compile the OgreAL project (I only compiled the project not the entire solution.) I am using Visual Studio 8 with service pack 1. When compilning OgreAL I get the following error messages:

error C2248: 'OgreAL::Sound::updateSound' : cannot access protected member declared in class 'OgreAL::Sound'
see declaration of 'OgreAL::Sound::updateSound'
warning C4267: 'initializing' : conversion from 'size_t' to 'OgreAL::SourceRef', possible loss of data

I found the dlls on the svn website (ogreal_d.dll and ogreal.dll), so I copied them instead. I also set up all the environmental vars and a project made in OpenAL works. (compiles and runs from VS). When I try to run the "BasicDemo" i get the following linking errors:

unresolved external symbol "__declspec(dllimport) public: bool __thiscall OgreAL::Sound::stop(void)" (__imp_?stop@Sound@OgreAL@@QAE_NXZ) referenced in function "public: virtual bool __thiscall DeviceListener::keyPressed(class OIS::KeyEvent const &)" (?keyPressed@DeviceListener@@UAE_NABVKeyEvent@OIS@@@Z)

(three of these errors in listener.obj and ogreapp.obj)

OgreApp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall OgreAL::SoundManager::SoundManager(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0SoundManager@OgreAL@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: __thiscall OgreApp::OgreApp(void)" (??0OgreApp@@QAE@XZ)

(seven more errors from the SoundManager class in ogreapp.obj)

The project compiles fine, but does not run because of the linking errors. I copied the ogreal_d.dll and ogreal.dll files into the debug and "root" folder of the demo but that did not work. I tried everything I could find on these forums but could not get the OgreAL project or the demo to compile.

If someone could please help me with this, I would appreciate it dearly.