0
0

Hey :)

I’ve been having reproducible linkage errors on several computers, several VC++ versions, and several FMOD versions.
I’m now kinda desperate, actually, so I’m turning towards you all for help.

What’s happening is that, basically, VC++ can link my FMOD program in Debug mode, but not in Release mode. The very very awkward part is that I’m using fmodex_vc.lib for both Debug and Release…

It’s happening on VC++ Express 2010, and VC++ Express 2008 as well, on two Win 7 x64 computers. FMod versions are 4.32.06 and 4.32.04 (both 32 bits installations).

The linkage errors are quite common. The output is what would happen if fmodex_vc.lib wasn’t found. Oddly enough, this is also exactly what happened when I tried to use the C++ interface with MinGW and NetBeans (unknown symbols).

So right now I’m wondering if this has something to do with me, or the FMod libraries themselves.
Again, it compiles, links, and works awesome in Debug, with fmodex_vc.lib, in 2008 and 2010.

Thanks in advance for any help.
VC++ output below.

[code:3en27a1y]1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::setLoopPoints(unsigned int,unsigned int,unsigned int,unsigned int)" (?setLoopPoints@Sound@FMOD@@QAE?AW4FMOD_RESULT@@IIII@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::setLoopCount(int)" (?setLoopCount@Sound@FMOD@@QAE?AW4FMOD_RESULT@@H@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::setMode(unsigned int)" (?setMode@Sound@FMOD@@QAE?AW4FMOD_RESULT@@I@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::getLength(unsigned int *,unsigned int)" (?getLength@Sound@FMOD@@QAE?AW4FMOD_RESULT@@PAII@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::release(void)" (?release@Sound@FMOD@@QAE?AW4FMOD_RESULT@@XZ)
1>AbstractSoundFModImpl.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)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::isPlaying(bool *)" (?isPlaying@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PA_N@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getPosition(unsigned int *,unsigned int)" (?getPosition@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PAII@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPosition(unsigned int,unsigned int)" (?setPosition@Channel@FMOD@@QAE?AW4FMOD_RESULT@@II@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getVolume(float *)" (?getVolume@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PAM@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setVolume(float)" (?setVolume@Channel@FMOD@@QAE?AW4FMOD_RESULT@@M@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPaused(bool)" (?setPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@_N@Z)
1>AbstractSoundFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::stop(void)" (?stop@Channel@FMOD@@QAE?AW4FMOD_RESULT@@XZ)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol _FMOD_System_Create
1>SoundManagerFModImpl.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)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getVersion(unsigned int *)" (?getVersion@System@FMOD@@QAE?AW4FMOD_RESULT@@PAI@Z)
1>SoundManagerFModImpl.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)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::setSpeakerMode(enum FMOD_SPEAKERMODE)" (?setSpeakerMode@System@FMOD@@QAE?AW4FMOD_RESULT@@W4FMOD_SPEAKERMODE@@@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::setDSPBufferSize(unsigned int,int)" (?setDSPBufferSize@System@FMOD@@QAE?AW4FMOD_RESULT@@IH@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::setSoftwareFormat(int,enum FMOD_SOUND_FORMAT,int,int,enum FMOD_DSP_RESAMPLER)" (?setSoftwareFormat@System@FMOD@@QAE?AW4FMOD_RESULT@@HW4FMOD_SOUND_FORMAT@@HHW4FMOD_DSP_RESAMPLER@@@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getDriverCaps(int,unsigned int *,int *,int *,enum FMOD_SPEAKERMODE *)" (?getDriverCaps@System@FMOD@@QAE?AW4FMOD_RESULT@@HPAIPAH1PAW4FMOD_SPEAKERMODE@@@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getDriverInfo(int,char *,int,struct FMOD_GUID *)" (?getDriverInfo@System@FMOD@@QAE?AW4FMOD_RESULT@@HPADHPAUFMOD_GUID@@@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::getNumDrivers(int *)" (?getNumDrivers@System@FMOD@@QAE?AW4FMOD_RESULT@@PAH@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::setOutput(enum FMOD_OUTPUTTYPE)" (?setOutput@System@FMOD@@QAE?AW4FMOD_RESULT@@W4FMOD_OUTPUTTYPE@@@Z)
1>SoundManagerFModImpl.obj : error LNK2001: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::release(void)" (?release@System@FMOD@@QAE?AW4FMOD_RESULT@@XZ)
1>E:\Users\Brice\Documents\Visual Studio 2010\Projects\simengines-g2\SimEngine-g2-Sound\Release\SimEngine-g2-Sound.exe : fatal error LNK1120: 25 unresolved externals[/code:3en27a1y]

  • You must to post comments
0
0

Hi Mangatome, welcome to the FMOD forums!

It is unlikely that the errors are related to your OS or version of Visual Studio, it sounds like the problem is in the project configuation. Double check the linker->input section for Release of every project which uses FMOD.

  • You must to post comments
0
0

Hej!

I was of course expecting the error to be due to the project configuration, and I triple checked before posting the original post.

I also reinstalled the latest FMOD to make sure it was in the proper directory.
And finally I parsed the link log outputs of the VC linker, and I can tell you the library file is found, but the external symboles are not. Which is so weird!
Below, my project configuration.

[code:1cz543e7]
C/C++ > Include directories : C:\Program Files %28×86%29\FMOD SoundSystem\FMOD Programmers API Win32\api\inc;C:\CppTools\boost-1_42\boost_1_42_0;%(AdditionalIncludeDirectories)
Linker > General > Additionnal Lib directories : C:\CppTools\commonlib;C:\Program Files %28×86%29\FMOD SoundSystem\FMOD Programmers API Win32\api\lib;%(AdditionalLibraryDirectories)
Linker > Input > Additionnal dependencies : fmodex_vc.lib;libboost_thread-vc100-mt-1_42.lib;libboost_date_time-vc100-mt-1_42.lib;%(AdditionalDependencies)
[/code:1cz543e7]

For what it’s worth, here is the linking log. It seems that the file is found, but no symbol is found inside.

[code:1cz543e7]
1> Starting pass 1
1> Processed /DEFAULTLIB:msvcprt
1> Processed /DEFAULTLIB:libboost_thread-vc100-mt-1_42.lib
1> Processed /DEFAULTLIB:libboost_date_time-vc100-mt-1_42.lib
1> Processed /DEFAULTLIB:MSVCRT
1> Processed /DEFAULTLIB:OLDNAMES
1>
1> Searching libraries
1> Searching C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\api\lib\fmodex_vc.lib:
1> Searching C:\CppTools\commonlib\libboost_thread-vc100-mt-1_42.lib:
1> Found "public: void __thiscall boost::thread::interrupt(void)" (?interrupt@thread@boost@@QAEXXZ)
1> Referenced in MixingManager.obj
1> Loaded libboost_thread-vc100-mt-1_42.lib(thread.obj)
1> Processed /DEFAULTLIB:uuid.lib
1> Found _tss_cleanup_implemented
1> Referenced in libboost_thread-vc100-mt-1_42.lib(thread.obj)
1> Loaded libboost_thread-vc100-mt-1_42.lib(tss_pe.obj)
1> Searching C:\CppTools\commonlib\libboost_date_time-vc100-mt-1_42.lib:
1> Searching C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib:
1> Found __imp__CreateEventA@16
1> Referenced in SoundHelper.obj
1> Referenced in libboost_thread-vc100-mt-1_42.lib(thread.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__CloseHandle@4
1> Referenced in SoundHelper.obj
1> Referenced in libboost_thread-vc100-mt-1_42.lib(thread.obj)
1> Loaded kernel32.lib(KERNEL32.dll)
1> Found __imp__SetEvent@4
1> Referenced in SoundHelper.obj
1> Referenced in libboost_thread-vc100-mt-1_42.lib(thread.obj)
1> Lo

  • You must to post comments
0
0

Only thing I might suggest is to change your path from:
C:\Program Files %28×86%29\FMOD SoundSystem\FMOD Programmers API Win32\api\inc
to:
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Win32\api\inc

(Note: changed %28 and %29 to ‘(‘ and ‘)’ respectively.)

Hope that helps.

  • You must to post comments
0
0

Thanks for trying to help me guys :).

Still won’t work.
Actually in Debug mode, the path is C:\Program Files %28×86%29\FMOD SoundSystem\FMOD Programmers API Win32\api\inc ; and it links…

Might I add that I even tried by putting fmodex_vc.lib in C:\cpptools\commonlib… ? And that this linked in Debug but not in Release…
Feels like this: http://www.gamedev.net/community/forums … _id=378632 ; except that I’ve checked a lot of times now the path and lib inputs in the project settings…
Can someone confirm to me that Fmod links on a Win 7 64bits / VC 2008 or 2010 platform?

  • You must to post comments
0
0

If you want to confirm that it can link try the examples. I’m pretty sure the problem will be something in the project configuration.

  • You must to post comments
0
0

Peter’s right, but if you do want independent verification, I can tell you that FMOD links in properly with my project in both Win32 and x64 configurations. I have 12 different project configurations (2 platforms times 6 configurations) and I link fine in all of them.

Since it links in debug mode, but not in release mode, I would check to see what’s different between the two. Try recreating the project (if possible). And, as Peter says, try compiling the examples.

  • You must to post comments
0
0

OK guys, you’re right :)
The "geometry" example links in Release as well.
I’m going to check what’s wrong with me!
Thanks!

EDIT: Duh! I forgot to add the following preprocessing notes:
WIN32;NDEBUG;_CONSOLE

Thank you guys and sorry for doubting teh lib :) I works fine now!

  • You must to post comments
0
0

Glad to hear it is all working. :)

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.