fmod VS2008 依赖项目中未解析的外部

发布于 2024-08-14 03:49:24 字数 2672 浏览 4 评论 0原文

我目前正在尝试在我的项目中使用最新的稳定 fmod ex。

我在一个名为engine4的项目中有一个主要可执行文件,在解决方案中还有一个名为DX9Platform的项目以及ti所依赖的项目。所有 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 * *)" (?createSound@System@FMOD@@QAE?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z)
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getVersion(unsigned int *)" (?getVersion@System@FMOD@@QAE?AW4FMOD_RESULT@@PAI@Z)
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::init(int,unsigned int,void *)" (?init@System@FMOD@@QAE?AW4FMOD_RESULT@@HIPAX@Z)
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 * *)" (?playSound@System@FMOD@@QAE?AW4FMOD_RESULT@@W4FMOD_CHANNELINDEX@@PAVSound@2@_NPAPAVChannel@2@@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getPaused(bool *)" (?getPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PA_N@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPaused(bool)" (?setPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@_N@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: virtual class IAudioObject * __thiscall CFModAudioObject::LoadFile(char const *)" (?LoadFile@CFModAudioObject@@UAEPAVIAudioObject@@PBD@Z)
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 ==========

I'm currently trying to use the latest stable fmod ex in my project.

I have a main executable in a project called engine4, and a project named DX9Platform in the solution as well which ti depends on. All the fmod code is in this DX9Platform project, which generates a lib file.

DX9Platform includes fmodex_vc.lib and builds fine. However building Engien4 results in unresolved external symbol messages referencing files that use fmod in the DX9Platform project

I have tried adding fmodex_vc.lib to the Engine4 project, with no success, how do I fix this?

Heres the linker output:

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 * *)" (?createSound@System@FMOD@@QAE?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z)
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getVersion(unsigned int *)" (?getVersion@System@FMOD@@QAE?AW4FMOD_RESULT@@PAI@Z)
3>DX9PlatformLib.lib(CFmodSound.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::init(int,unsigned int,void *)" (?init@System@FMOD@@QAE?AW4FMOD_RESULT@@HIPAX@Z)
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 * *)" (?playSound@System@FMOD@@QAE?AW4FMOD_RESULT@@W4FMOD_CHANNELINDEX@@PAVSound@2@_NPAPAVChannel@2@@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getPaused(bool *)" (?getPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PA_N@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPaused(bool)" (?setPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@_N@Z)
3>DX9PlatformLib.lib(CFModAudioObject.obj) : error LNK2001: unresolved external symbol "public: virtual class IAudioObject * __thiscall CFModAudioObject::LoadFile(char const *)" (?LoadFile@CFModAudioObject@@UAEPAVIAudioObject@@PBD@Z)
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 ==========

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

垂暮老矣 2024-08-21 03:49:24

这里的技巧是,由于编译器不匹配,使用 C++ API 永远不会起作用,因此请尽可能使用 C API。

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

The trick here is that using the C++ API will never work because of compiler mismatches, so use the C API wherever possible.

Also be aware that some fmod documentation is out of date. Certain code will 'compile' but will never fully link/work

雨落□心尘 2024-08-21 03:49:24

我在 VS2005 下编译的 FMOD 4.32.02 64 位也有同样的问题。但是,32 位版本可以按预期进行链接和工作,因此我目前正在使用它。

实际上,我在使用另一个库 libsndfile 时遇到了完全相同的问题。当我第二次遇到它时,我排除了库编译错误的可能性。显然,您可以使用 任何 64 位库。

幸运的是,您只需设置 编译选项我还没试过,但是有大量 信息 那里

I had the same issue with FMOD 4.32.02 64-bit, compiled under VS2005. However, the 32-bit version links and works as expected, so I am currently using that instead.

I actually had the exact same issue when using another library, libsndfile. When I came across it a second time, I ruled out the possibility of the library having been compiled wrong. Apparently, you may get this with any 64-bit library.

Fortunately, all you need to to set a compiler option. I haven't tried it yet, but there is plenty of info out there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文