2009-12-10 85 views
1

我目前正在尝试在我的项目中使用最新的稳定fmod ex。fmod VS2008依赖项目中未解决的外部问题

我在一个名为engine4的项目中有一个主要的可执行文件,在解决方案中也有一个名为DX9Platform的项目,这个项目依赖于。所有的fmod代码都在这个DX9Platform项目中,它生成一个lib文件。

DX9Platform包含fmodex_vc.lib并且可以正常工作。然而,构建Engien4会导致无法解析的外部符号消息引用在DX9Platform项目中使用fmod的文件

我曾尝试将fmodex_vc.lib添加到Engine4项目,但没有成功,我该如何解决这个问题?

继承人的链接器输出:

3>------ Build started: Project: Engine4, Configuration: Release Direct3D9 Win32 ------ 
3>Linking... 
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol _FMOD_System_Create 
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::createSound(char const *,unsigned int,struct FMOD_CREATESOUNDEXINFO *,class FMOD::Sound * *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getVersion(unsigned int *)" ([email protected]@[email protected]@[email protected]@[email protected]) 
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::init(int,unsigned int,void *)" ([email protected]@[email protected]@[email protected]@[email protected]) 
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::playSound(enum FMOD_CHANNELINDEX,class FMOD::Sound *,bool,class FMOD::Channel * *)" ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getPaused(bool *)" ([email protected]@[email protected]@[email protected]@[email protected]) 
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPaused(bool)" ([email protected]@[email protected]@[email protected]@[email protected]) 
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: virtual class IAudioObject * __thiscall CFModAudioObject::LoadFile(char const *)" ([email protected]@@[email protected]@[email protected]) 
3>D:\media\desktop\engine4\Engine4\Output\Release Direct3D9\Engine4.exe : fatal error LNK1120: 8 unresolved externals 
3>Build log was saved at "file://d:\media\desktop\engine4\Engine4\Engine4\intermediate\Release Direct3D9\BuildLog.htm" 
3>Engine4 - 9 error(s), 0 warning(s) 
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 1 skipped ========== 
+0

你能在这里发布确切的链接器输出吗?它可能是一些编译器设置导致的符号不匹配。 – 2009-12-10 04:51:43

+0

完成,编辑了问题 – 2009-12-10 04:55:49

+0

我也有这个问题。 – 2010-04-02 23:07:21

回答

0

这里的技巧是使用C++ API绝不会因为编译器不匹配的工作,所以尽可能使用C API。

另请注意,某些fmod文档已过时。某些代码将“编译”,但不会完全链接/工作

0

我有与VS2005编译的FMOD 4.32.02 64位相同的问题。但是,32位版本链接并按预期工作,所以我正在使用它。

当使用另一个库libsndfile时,我确实遇到了完全相同的问题。当我第二次遇到它时,我排除了图书馆编译错误的可能性。显然,你可能会得到这个any 64-bit library

幸运的是,您只需设置一个compiler option即可。我还没有试过,但有plentyinfothere