I recently downloaded FMODEx v4.01.00, but I can’t seem to get it to link on either Windows or OS X.

Window command line:[code:38qxelj9] "link" /nologo bin\fq.res /subsystem:windows /out:"bin\diamond\feynas_qu
est.exe\vc-7_1\default_build\threading-multi\feynas_quest.exe" /LIBPATH:"..\ac
orn\dist" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\lib"
"user32.lib" "advapi32.lib" "dxguid.lib" "libacorn_old_d.lib" "opengl32.lib" "
glu32.lib" "SDL.lib" "SDL_mixer.lib" "SDLmain.lib" "freetype.lib" "fmodex.lib"

(feynas_quest.CMD only contains a long list of object files from my project.)

Windows error messages:[code:38qxelj9]LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
sound.obj : error LNK2019: unresolved external symbol _FMOD_System_Create refere
nced in function "enum FMOD_RESULT __cdecl FMOD::System_Create(class FMOD::Syste
m * *)" (?System_Create@FMOD@@YA?AW4FMOD_RESULT@@PAPAVSystem@1@@Z)
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 sound_system
::sound_system(void)" (??0sound_system@@QAE@XZ)
sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT
__thiscall FMOD::System::release(void)" (?release@System@FMOD@@QAE?AW4FMOD_RESUL
T@@XZ) referenced in function "public: __thiscall sound_system::~sound_system(vo
id)" (??1sound_system@@QAE@XZ)
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: void __thiscall Sound::flush(void)" (?flush
sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT
__thiscall FMOD::System::playSound(enum FMOD_CHANNELINDEX,class FMOD::Sound *,bo
ol,class FMOD::Channel * *)" (?playSound@System@FMOD@@QAE?AW4FMOD_RESULT@@W4FMOD
_CHANNELINDEX@@PAVSound@2@_NPAPAVChannel@2@@Z) referenced in function "public: v
oid __thiscall Sound::play(int,int)const " (?play@Sound@@QBEXHH@Z)
sound.obj : error LNK2019: unresolved external symbol "public: enum FMOD_RESULT
__thiscall FMOD::System::createSound(char const *,unsigned int,struct FMOD_CREAT
ESOUNDEXINFO *,class FMOD::Sound * *)" (?createSound@System@FMOD@@QAE?AW4FMOD_RE
SULT@@PBDIPAUFMOD_CREATESOUNDEXINFO@@PAPAVSound@2@@Z) referenced in function "pu
blic: void __thiscall Sound::play(int,int)const " (?play@Sound@@QBEXHH@Z)
xe : fatal error LNK1120: 6 unresolved externals[/code:38qxelj9]

This is on Windows XP with Microsoft Visual C++ .NET 2003. I have copied the fmodex_vc.lib and fmodex.dll into my project directory and renamed the former to fmodex.lib.

Command line on OS X:[code:38qxelj9] c++ -Wl,-x -o "bin/diamond/feynas_exile/darwin/default_build/feynas_exile" very_long_list_of_object_files.o -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -F/System/Library/Frameworks -framework OpenGL -framework AGL -framework IOKit -framework AudioToolbox -framework AudioUnit -framework Cocoa -framework Carbon -framework QuickTime \
-L"../acorn/dist" -lacorn_old_d -lSDL -lSDL_mixer -lSDLmain -lfreetype -lfmodex \

Error message on OS X:[code:38qxelj9]ld: can’t locate file for: -lfmodex[/code:38qxelj9]

I have copied the file fmodex.dylib into my project directory. I have not found any .a or .la files to copy. I have found a file called fmodex_cmf.lib, but I don’t know how to use it. This is on OS X 10.3.9, gcc 3.3.

  • You must to post comments

[quote="brett":217xr3hw]-l looks in the standard C libary path. You have to tell the linker where fmod is by using -L and the path.[/quote:217xr3hw]

Ok. I managed to get my program to link under OS X. It doesn’t work properly and crashes on shut-down, but I assume that is a programming error on my part.

[quote:217xr3hw]Try the examples, especially in the windows version. see if they link because i’m pretty sure they do.[/quote:217xr3hw]

The examples link fine from the Visual Studio .NET IDE. After comparing y own command lines with the command lines generated by the Visual Studio IDE, I discovered the source of the problem. My C++ files were compiled without either WIN32 or WIN32 defined, which caused fmod.h to fail to detect the platform correctly. I fixed this by replaing this line:[code:217xr3hw]#elif (defined(WIN32) || defined(WIN32) || defined(_WIN64) || defined(_XBOX))[/code:217xr3hw] with this line: [code:217xr3hw]#elif (defined(WIN32) || defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(_XBOX))[/code:217xr3hw]

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.