0
0

Compiler: Visual C++ 2008 Express Edition

when I use fmod in my programs I always get these errors
[code:2hczsjxi]
main.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 "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ)
main.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 "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ)
main.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 "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ)
main.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)
[/code:2hczsjxi]

and here is some of my code generating the errors
[code:2hczsjxi]

include <fmod.hpp>

int main()
{
FMOD::System* system;
FMOD::System_Create(&system);
system -> init(200, FMOD_INIT_NORMAL, 0);
FMOD::Sound* title_music;
system -> createSound("sounds/music/title.mp3", FMOD_DEFAULT, 0, &title_music);
FMOD::Channel* channel;

system -&gt; playSound(FMOD_CHANNEL_FREE, title_music, FALSE, &amp;channel);

return 0;

}
[/code:2hczsjxi]

if I try using any of these functions to inplement sounds in a program I get those errors. I have no idea what they mean. Could someone please help me with this?

  • You must to post comments
0
0

Did we forget to include the lib file in the linker options? Hmm?

  • You must to post comments
0
0

no i made sure i included that, which is why im so confused

  • You must to post comments
0
0

What about the fmod examples? The playsound example comes with vs projects and looks amost like your code.

Note that the way you have coded that the sound wont be audible, the program will exit straight after the sound starts playing.

  • You must to post comments
0
0

the examples compile fine, i dont get any errors.

  • You must to post comments
0
0

i just dont get it, for some reason i can never get my code to compile. im using fmodex.dll, so link fmodex_vc.lib, my code looks exactly like the examples but it just wont work ๐Ÿ˜•

  • You must to post comments
0
0

I know you’ve said the examples run fine but have you made sure that you’ve told visual studio where to look for its includes and libs.

Tools->Options->Projects and Solutions->VC++ Directories

It has to be set for both Includes and Library files just like you do with the DXSDK

  • You must to post comments
0
0

yeah i have, everything runs fine until it comes to a line dealing with FMOD::System (like FMOD::System_Create()); aside from this FMOD::System* system;

  • You must to post comments
0
0

Just a guess, but perhaps you created an empty project for your application then built up from there, so the default preprocessor defines are not set. Make sure WIN32 is in the list of preprocessor defines or FMOD won’t know which platform you are on.

  • You must to post comments
0
0

i didnt know i needed to do that ๐Ÿ˜† thanx i got it working now

  • You must to post comments
0
0

i have same problems.
i am using code::blocks IDE with visual c++ compiller (9.0, vs 2008). i am sure i added fmodex_vc.lib to my project, also i defined WIN32 symbol in project’s settings. i confirmed this by writing

ifdef WIN32

error works!

endif

same linker errors.

any help appreciated.

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.