0
0

I am using Visual Studio 2008 Express C++ and have made a class that sets up and runs FMOD, and I get a linker error on every FMOD function that I call. Every function call is inside the scope of the class, and the intellisense for VS recognizes the functions in the editor. I have included fmod.hpp and triple checked that I have the libraries and dlls in the right place to be accessible to the program. Can anyone help me out? I can post code snippets if asked.

  • You must to post comments
0
0

Have you set fmod_event64.lib and fmodex_vc.lib as a dependencies in project properties ( Configuration Properties -> Linker -> Input ) ?

  • You must to post comments
0
0

Have you set fmodex_vc.lib as a dependency?

Configuration Propeties->Linker->Input->Additional Dependencies

  • You must to post comments
0
0

I am using multithreaded debug runtime if that makes a difference…

I have also tried including fmodex64_vc.lib as an input dependency but makes no difference…

  • You must to post comments
0
0

I have fmodex_vc.lib in my dependencies for the project, and I am still getting the linker errors. however, one of the errors seems to be complaining about FMOD_System_Create inside FMOD::System::createSystem. Out of the 13 linker errors that I get (one for each of the FMOD functions that I call), it is the only one that seems to be complaining about a reference inside the FMOD function

  • You must to post comments
0
0

[quote="peter":nz7nxf4p]Have you set fmod_event64.lib and fmodex_vc.lib as a dependencies in project properties ( Configuration Properties -> Linker -> Input ) ?[/quote:nz7nxf4p]

Yup i have. I am using 64 bit edition. There doesn’t appear to be fmodex_vc.lib, only fmodex64_vc.lib

Here is the complete linker command line output:

/OUT:"Debug/Tetris.exe" /INCREMENTAL /NOLOGO /LIBPATH:"D:\Programming\Packages\bullet-2.76\lib\Debug" /LIBPATH:"D:\Programming\Packages\FMOD Programmers API Win64\fmoddesignerapi\api\lib" /LIBPATH:"D:\Programming\Packages\FMOD Programmers API Win64\api\lib" /MANIFEST:NO /DEBUG /PDB:"Debug/Matrices.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib BulletCollision.lib BulletDynamics.lib LinearMath.lib fmodex64_vc.lib fmod_event64.lib fmod_event_net64.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

  • You must to post comments
0
0

Can you post the errors your getting.

Also try comparing your project setting to the example projects.

  • You must to post comments
0
0

Ok, so i downloaded the 32bit edition, and everything worked fine. i wonder if theres a WIN32_64BIT preprocessor needed somewhere or something for it to work…

Either way, i think ill just stick with 32 bit! woop.

  • You must to post comments
0
0

well, here are the errors that I am getting:

Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::init(int,unsigned int,void *)" (?init@System@FMOD@@QAE?AW4FMOD_RESULT@@HIPAX@Z) referenced in function "public: __thiscall Audio::Audio(void)" (??0Audio@@QAE@XZ)
1>Sound.obj : error LNK2019: unresolved external symbol _FMOD_System_Create referenced in function "enum FMOD_RESULT __cdecl FMOD::System_Create(class FMOD::System * *)" (?System_Create@FMOD@@YA?AW4FMOD_RESULT@@PAPAVSystem@1@@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::release(void)" (?release@System@FMOD@@QAE?AW4FMOD_RESULT@@XZ) referenced in function "public: __thiscall Audio::~Audio(void)" (??1Audio@@QAE@XZ)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Sound::release(void)" (?release@Sound@FMOD@@QAE?AW4FMOD_RESULT@@XZ) referenced in function "public: __thiscall Audio::~Audio(void)" (??1Audio@@QAE@XZ)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::update(void)" (?update@System@FMOD@@QAE?AW4FMOD_RESULT@@XZ) referenced in function "public: void __thiscall Audio::Update(void)" (?Update@Audio@@QAEXXZ)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setPaused(bool)" (?setPaused@Channel@FMOD@@QAE?AW4FMOD_RESULT@@_N@Z) referenced in function "public: void __thiscall Audio::Play_SFX(int)" (?Play_SFX@Audio@@QAEXH@Z)
1>Sound.obj : error LNK2019: 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) referenced in function "public: void __thiscall Audio::Play_SFX(int)" (?Play_SFX@Audio@@QAEXH@Z)
1>Sound.obj : error LNK2019: 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) referenced in function "public: void __thiscall Audio::Play_SFX(int)" (?Play_SFX@Audio@@QAEXH@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::System::createStream(char const *,unsigned int,struct FMOD_CREATESOUNDEXINFO *,class FMOD::Sound * *)" (?createStream@System@FMOD@@QAE?AW4FMOD_RESULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z) referenced in function "public: void __thiscall Audio::Play_BGM(char *)" (?Play_BGM@Audio@@QAEXPAD@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::stop(void)" (?stop@Channel@FMOD@@QAE?AW4FMOD_RESULT@@XZ) referenced in function "public: void __thiscall Audio::Play_BGM(char *)" (?Play_BGM@Audio@@QAEXPAD@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::isPlaying(bool *)" (?isPlaying@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PA_N@Z) referenced in function "public: void __thiscall Audio::Play_BGM(char *)" (?Play_BGM@Audio@@QAEXPAD@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::setVolume(float)" (?setVolume@Channel@FMOD@@QAE?AW4FMOD_RESULT@@M@Z) referenced in function "public: void __thiscall Audio::Play_Radio(char *)" (?Play_Radio@Audio@@QAEXPAD@Z)
1>Sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __thiscall FMOD::Channel::getVolume(float *)" (?getVolume@Channel@FMOD@@QAE?AW4FMOD_RESULT@@PAM@Z) referenced in function "public: void __thiscall Audio::Play_Radio(char *)" (?Play_Radio@Audio@@QAEXPAD@Z)

if that helps at all, please let me know.

  • You must to post comments
0
0

[quote:38vgqo0u]Yup i have. I am using 64 bit edition. There doesn’t appear to be fmodex_vc.lib, only fmodex64_vc.lib [/quote:38vgqo0u]
You’re right, my bad.

[quote:38vgqo0u]I checked that WIN32 is defined in the preprocessor definitions. [/quote:38vgqo0u]
If you’re doing 64-bit I think that should be WIN64 instead.

  • You must to post comments
0
0

I can’t see anything out of the ordinary there. It seems the visual studio isn’t finding the lib. From my experience visual studio will complain ‘.lib not found’ before giving the ‘unresolved symbol’ errors.

Try renaming the fmodex_vc.lib file, then recompile: if you still get the same errors, that means that the lib isn’t set up as a dependency.

Also, do you have multiple projects in the sln with dependencies?

-Pete

  • You must to post comments
0
0

I’ve had ocasion when the adding of a lib would not take because I did not add it properly because of VS UI… Make sure to add the dependency for debug and release configuration, do it independently with the drop down set to the right configuration.

I never had this sort of error though.

Set the configuration to release in the toolbar to debug before accessing the project properties, add your changes. close the window. repeat for the release configuration.

  • You must to post comments
0
0

I tried renaming the fmodex_vc.lib, and then I got a linker error that it cannot find the file.

Also, this is a single project sln. And I have made sure the dependency is for all configurations, and I get the errors under debug and release modes.

So for some reason, VS is able to find and open the the lib, but is not able to see where the functions are inside of the lib. And before anyone asks, I have checked to make sure the functions are called correctly.

So does anyone have any clues as to why VS would be having this much trouble?

  • You must to post comments
0
0

That is very strange, I’ve never heard of anything like this before. Can you try downloading fresh copy of FMOD and replace the lib/dll/headers with the new ones, it might help us isolate the problem.

  • You must to post comments
0
0

Make sure your preprocessor define list includes "WIN32", this is needed for fmod.h to resolve some macros.

WIN32 is normally defined by default but if you created a blank project and built it up from scratch it will be missing.

  • You must to post comments
0
0

I am having this exact problem with visual studio express 2008 also!

This is a fresh copy of FMOD downloaded today. I have tried renaming the libs to make sure visual studio is finding them.

I have added both:
fmod_event64.lib
fmod_event_net64.lib
As input dependencies for the project.

I checked that WIN32 is defined in the preprocessor definitions.

Can somebody please help!

These are my linking errors:

>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::release(void)" (?release@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@XZ) referenced in function "public: __thiscall FMODAudio::~FMODAudio(void)" (??1FMODAudio@@QAE@XZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "enum FMOD_RESULT __stdcall FMOD::NetEventSystem_Shutdown(void)" (?NetEventSystem_Shutdown@FMOD@@YG?AW4FMOD_RESULT@@XZ) referenced in function "public: __thiscall FMODAudio::~FMODAudio(void)" (??1FMODAudio@@QAE@XZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "enum FMOD_RESULT __stdcall FMOD::NetEventSystem_Init(class FMOD::EventSystem *,unsigned short)" (?NetEventSystem_Init@FMOD@@YG?AW4FMOD_RESULT@@PAVEventSystem@1@G@Z) referenced in function "public: bool __thiscall FMODAudio::Init(void)" (?Init@FMODAudio@@QAE_NXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::getMusicSystem(class FMOD::MusicSystem * *)" (?getMusicSystem@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVMusicSystem@2@@Z) referenced in function "public: bool __thiscall FMODAudio::Init(void)" (?Init@FMODAudio@@QAE_NXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::init(int,unsigned int,void *,unsigned int)" (?init@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HIPAXI@Z) referenced in function "public: bool __thiscall FMODAudio::Init(void)" (?Init@FMODAudio@@QAE_NXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::getVersion(unsigned int *)" (?getVersion@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PAI@Z) referenced in function "public: bool __thiscall FMODAudio::Init(void)" (?Init@FMODAudio@@QAE_NXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol _FMOD_EventSystem_Create@4 referenced in function "enum FMOD_RESULT __cdecl FMOD::EventSystem_Create(class FMOD::EventSystem * *)" (?EventSystem_Create@FMOD@@YA?AW4FMOD_RESULT@@PAPAVEventSystem@1@@Z)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "enum FMOD_RESULT __stdcall FMOD::NetEventSystem_Update(void)" (?NetEventSystem_Update@FMOD@@YG?AW4FMOD_RESULT@@XZ) referenced in function "public: void __thiscall FMODAudio::Update(void)" (?Update@FMODAudio@@QAEXXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::update(void)" (?update@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@XZ) referenced in function "public: void __thiscall FMODAudio::Update(void)" (?Update@FMODAudio@@QAEXXZ)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::setMediaPath(char const *)" (?setMediaPath@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBD@Z) referenced in function "public: void __thiscall FMODAudio::SetAudioPath(char const *)" (?SetAudioPath@FMODAudio@@QAEXPBD@Z)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::load(char const *,struct FMOD_EVENT_LOADINFO *,class FMOD::EventProject * *)" (?load@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAUFMOD_EVENT_LOADINFO@@PAPAVEventProject@2@@Z) referenced in function "public: void __thiscall FMODAudio::Load(char const *)" (?Load@FMODAudio@@QAEXPBD@Z)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::Event::start(void)" (?start@Event@FMOD@@QAG?AW4FMOD_RESULT@@XZ) referenced in function "public: void __thiscall FMODAudio::PlaySoundEvent(char const *)" (?PlaySoundEvent@FMODAudio@@QAEXPBD@Z)
1>FMODAudio.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT __stdcall FMOD::EventSystem::getEvent(char const *,unsigned int,class FMOD::Event * *)" (?getEvent@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBDIPAPAVEvent@2@@Z) referenced in function "public: void __thiscall FMODAudio::PlaySoundEvent(char const *)" (?PlaySoundEvent@FMODAudio@@QAEXPBD@Z)
1>Debug/Tetris.exe : fatal error LNK1120: 13 unresolved externals

  • You must to post comments
Showing 15 results
Your Answer

Please first to submit.