[Solved] OgreAL won't build

Savoy

01-08-2007 20:38:53

Hi!

I'm having trouble building OgreAL. When I build it I get these errors:

------ Build started: Project: OgreAL, Configuration: Debug Win32 ------
Linking...
Creating library C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.lib and object C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
OgreALSoundManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z) referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALListener.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void * __thiscall Ogre::MemoryManager::op_new_sc(unsigned int,unsigned int)" (__imp_?op_new_sc@MemoryManager@Ogre@@AAEPAXII@Z)
OgreALSoundManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ) referenced in function "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALListener.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: unsigned int __thiscall Ogre::MemoryManager::_getProcessID(void)" (__imp_?_getProcessID@MemoryManager@Ogre@@AAEIXZ)
OgreALSoundManager.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z) referenced in function "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALListener.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_sc(void *,unsigned int)" (__imp_?op_del_sc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALListener.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall Ogre::ShadowCaster::generateShadowVolume(class Ogre::EdgeData *,class Ogre::HardwareIndexBufferSharedPtr,class Ogre::Light const *,class std::vector<class Ogre::ShadowRenderable *,class std::allocator<class Ogre::ShadowRenderable *> > &,unsigned long)" (?generateShadowVolume@ShadowCaster@Ogre@@MAEXPAVEdgeData@2@VHardwareIndexBufferSharedPtr@2@PBVLight@2@AAV?$vector@PAVShadowRenderable@Ogre@@V?$allocator@PAVShadowRenderable@Ogre@@@std@@@std@@K@Z)
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALListener.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z) referenced in function "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __thiscall Ogre::MemoryManager::op_del_vc(void *,unsigned int)" (__imp_?op_del_vc@MemoryManager@Ogre@@AAEXPAXI@Z)
OgreALListener.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::MemoryManager::setOwner(char const *,unsigned int,char const *)" (__imp_?setOwner@MemoryManager@Ogre@@QAEXPBDI0@Z) referenced in function "protected: virtual class Ogre::MovableObject * __thiscall OgreAL::ListenerFactory::createInstanceImpl(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 *)" (?createInstanceImpl@ListenerFactory@OgreAL@@MAEPAVMovableObject@Ogre@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBV?$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@@6@@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::MemoryManager::setOwner(char const *,unsigned int,char const *)" (__imp_?setOwner@MemoryManager@Ogre@@QAEXPBDI0@Z)
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Ogre::MemoryManager::setOwner(char const *,unsigned int,char const *)" (__imp_?setOwner@MemoryManager@Ogre@@QAEXPBDI0@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "public: __thiscall Ogre::Exception::~Exception(void)" (??1Exception@Ogre@@QAE@XZ)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "public: __thiscall Ogre::Exception::~Exception(void)" (??1Exception@Ogre@@QAE@XZ)
OgreALSound.obj : error LNK2001: unresolved external symbol "public: __thiscall Ogre::Exception::~Exception(void)" (??1Exception@Ogre@@QAE@XZ)
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "public: __thiscall Ogre::Exception::~Exception(void)" (??1Exception@Ogre@@QAE@XZ)
OgreALSoundManager.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::listResourceFileInfo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?listResourceFileInfo@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@@@Z) referenced in function "private: class OgreAL::Sound * __thiscall OgreAL::SoundManager::_createSound(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> >,bool)" (?_createSound@SoundManager@OgreAL@@AAEPAVSound@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V45@_N@Z)
C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.dll : fatal error LNK1120: 8 unresolved externals
Build log was saved at "file://c:\Program\OgreSDK\OgreAL\OgreAL\Debug\BuildLog.htm"
OgreAL - 44 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


It seems that there is some problems with the libs. I have built them all myself.

OgreMain_d.lib
OpenAL32.lib
ALut.lib
vorbis_static_d.lib
vorbisfile_static_d.lib
ogg_static_d.lib

And I really can't find out what's wrong on my own, so if you have any ideas, please help me.

CaseyB

01-08-2007 20:47:42

Are you building it against Dagon or Shoggoth? (The current stable version or the CVS head version) It seems that most of the issues have something to do with the memory manager.

Savoy

01-08-2007 22:15:36

Now I managed to download the latest SVN head of OgreAL (with a little help :) ). And now I'm getting these errors instead:

------ Build started: Project: OgreAL, Configuration: Debug Win32 ------
Compiling...
OgreALListener.cpp
c:\program\ogresdk\ogreal\src\ogreallistener.cpp(253) : error C2259: 'OgreAL::Listener' : cannot instantiate abstract class
due to following members:
'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
c:\program\ogrenew\ogremain\include\ogremovableobject.h(470) : see declaration of 'Ogre::MovableObject::visitRenderables'
OgreALOggSound.cpp
OgreALOggSoundStream.cpp
OgreALSound.cpp
c:\program\ogresdk\ogreal\src\ogrealsound.cpp(474) : error C2259: 'OgreAL::Sound' : cannot instantiate abstract class
due to following members:
'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
c:\program\ogrenew\ogremain\include\ogremovableobject.h(470) : see declaration of 'Ogre::MovableObject::visitRenderables'
c:\program\ogresdk\ogreal\src\ogrealsound.cpp(481) : error C2259: 'OgreAL::OggSound' : cannot instantiate abstract class
due to following members:
'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
c:\program\ogrenew\ogremain\include\ogremovableobject.h(470) : see declaration of 'Ogre::MovableObject::visitRenderables'
c:\program\ogresdk\ogreal\src\ogrealsound.cpp(488) : error C2259: 'OgreAL::OggSoundStream' : cannot instantiate abstract class
due to following members:
'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
c:\program\ogrenew\ogremain\include\ogremovableobject.h(470) : see declaration of 'Ogre::MovableObject::visitRenderables'
c:\program\ogresdk\ogreal\src\ogrealsound.cpp(500) : error C2259: 'OgreAL::WavSound' : cannot instantiate abstract class
due to following members:
'void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor *,bool)' : is abstract
c:\program\ogrenew\ogremain\include\ogremovableobject.h(470) : see declaration of 'Ogre::MovableObject::visitRenderables'
OgreALSoundManager.cpp
OgreALSoundStream.cpp
OgreALWavSound.cpp
Generating Code...
Build log was saved at "file://c:\Program\OgreSDK\OgreAL\OgreAL\Debug\BuildLog.htm"
OgreAL - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I haven't really looked at this myself yet, but I thought I'd put it here anyway 'cause I think I probably could use some help :)

The version of Ogre I'm using is the latest CVS head.

CaseyB

02-08-2007 07:10:24

I've never tested again the CVS head, I'm not sure that it works since I think there are some breaking changes in there. Is there something specific you need from the CVS head version or could you roll back to the latest stable release?

Savoy

02-08-2007 08:39:32

Hmm... You mean the stable release of OgreAL now, not Ogre?

Jekteir

03-08-2007 21:26:21

I think he means, could you roll back to Eihort Ogre?

I actually was wondering if OgreAL is up-to-date with the Ogre HEAD too; I'd like to implement the PCZSM and that's in line with the HEAD (and won't work without it), so I was hoping OgreAL was good to go too : )

Jekteir

05-08-2007 01:55:00

Add this in the 'public:' section of the header files OgreALListener.h and OgreALSound.h :


// added abstract function override so it will compile
virtual void visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables = false);


Hope that doesn't break anything Ogrely! OgreAL should build now. It's due to a pure function in Ogre::Renderable, though I have no idea if this inheritance problem was intended or not.

P.S. Maybe you could edit this post to [Solved] -- if it works for you?

Best,

Jek

Savoy

05-08-2007 18:03:56

Thanks for the help! But unfortunately I'm still having some problems.

When I added the code you provided and built it I got only one error, saying there was a trouble finding the lib file 'ALut.lib'. And when I linked that one I got this:

------ Build started: Project: OgreAL, Configuration: Debug Win32 ------
Linking...
Creating library C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.lib and object C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALListener.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Listener::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Listener@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALSoundStream.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALWavSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALOggSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALOggSoundStream.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALSound.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
OgreALSoundManager.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall OgreAL::Sound::visitRenderables(class Ogre::Renderable::Visitor *,bool)" (?visitRenderables@Sound@OgreAL@@UAEXPAVVisitor@Renderable@Ogre@@_N@Z)
C:\Program\OgreSDK\OgreAL\lib\Debug\OgreAL_d.dll : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Program\OgreSDK\OgreAL\OgreAL\Debug\BuildLog.htm"
OgreAL - 14 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


And now I'm stuck again.

I will now try following the tip of using the latest stable release of Ogre.

Really appeciate you guys take your time helping me!

Jekteir

05-08-2007 19:25:48

Apologies, I hadn't tried linking it.

In OgreALListener.cpp , add:


void Listener::visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables)
{
}


and in OgreALSound.cpp :


void Sound::visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables)
{
}


It ought to link now.

Savoy

06-08-2007 12:02:51

That seemed to do something. Now I only get the error:

error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."

From what I have read it seems that I'm supposed to edit something in Visual Studio? Anyone who knows what?

CaseyB

06-08-2007 17:11:51

You need to set environment variables, to tell VS where to put things. This error comes from nor being able to copy the dll into the samples area.

Savoy

06-08-2007 19:12:12

I guess this has something to do with the error.

Properties -> Build Events -> Post-Build Event'

In the command line here the only environment variable in use is the ALUT_BIN and there shouldn't be any problem finding the alut.dll with this.

Is it another environment variable I'm supposed to set?

Jekteir

06-08-2007 21:43:16

I'd tend to try removing anything from there and just letting VC++ put the files wherever it wants. See if that makes a difference. Another tip is to try setting it on verbose mode (I don't know where to set this) to get more info on what can't be accessed/found/created.

Jek

CaseyB

06-08-2007 22:15:58

After it builds it will create a build long. It will present you with a link to it in the output window and all you need to do it ctrl+click to open it. That should give you more info about what the problem is.

Savoy

07-08-2007 16:20:30

I've now tried without the post-build event and the build succeeded. And have I got it right when I think that all that the event does is copying two files? If so then that wouldn't be a problem that hard to solve in other ways.

But I still have problems getting the demos to build. I'm getting these errors:

c:\program\ogresdk\ogreal\demos\basic_demo\listener.cpp(96) : error C2039: 'getWorldOrientation' : is not a member of 'Ogre::SceneNode'
c:\program\ogrenew\ogremain\include\ogrescenenode.h(52) : see declaration of 'Ogre::SceneNode'

Savoy

07-08-2007 22:51:10

this had to do with the use of the CVS version of Ogre. And it was solved by replace getWorldOrientation with _getDerivedOrientation.

And now both OgreAL and the demos builds successfully. However the demos won't start :(. It complains something about there's someting wrong with:
?writeContentsToFile@RenderTarget@Ogre@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z in the DLL-file OgreMain_d.dll

I really thought it would work this time, but no :(

Jekteir

07-08-2007 23:24:12

I don't recall having much luck with the demos. I'd suggest trying to load a sound in your own application, if possible, and ignore the demos. That way at least you know your app ought to work with Ogre as it is.

You ought to be able to do something like:

Ogre::ResourceGroupManager *resgrpmgr = Ogre::ResourceGroupManager::getSingletonPtr();

resgrpmgr->addResourceLocation("./Sound","FileSystem","Sound"); // relative path to directory with sounds, it's a filesystem-type resource, you've named the resource group 'Sound'
resgrpmgr->initialiseResourceGroup(reslocName);

OgreAL::SoundManager *sndMgr = new OgreAL::SoundManager();

OgreAL::Sound *sound = sndMgr->createSound("ArbitrarilyNameTheSoundHereForTheSndMgr", "EnterRealRelativeFileNameAndExtensionHere.wav", false); // false is for whether the sound loops

//node->attachObject(sound); this line would be if you wanted it in the 3D space rather than just stereo out of the speakers with no 3D effects

sound->play(); // play the sound

Savoy

08-08-2007 12:32:04

Ok, I'll try that. Thanks for your help.

I guess we could consider this thread solved now.