Hi all,

How do you link the fmodex libraries with g++?

I am using Debian lenny, when installing I moved the headers to /usr/local/include
and libs to /usr/local/lib and renamed them to libfmodex.so …

I use these headers:


include <fmodex/fmodlinux.h> // includes fmod.h

include <fmodex/fmod.hpp> // says use in conjunction with fmod.h

include <fmodex/fmod_errors.h>


I used this compilation command:
g++ -o OG OGtest.cpp OGCoreHandler.cpp OGEngine.cpp OGSystem.cpp OGInput.cpp OGSound.cpp OGGraphics.cpp -lGL -lGLU sdl-config --libs --cflags

// and it gives me this output:

/tmp/ccwTXhuX.o: In function OGSound::OGDestroySound()':
OGSound.cpp:(.text+0x58b): undefined reference to
OGSound.cpp:(.text+0x5a4): undefined reference to FMOD::System::release()'
/tmp/ccwTXhuX.o: In function
OGSound::OGSoundInit(unsigned int, unsigned int, int)’:
OGSound.cpp:(.text+0x7d0): undefined reference to FMOD::System::setOutput(FMOD_OUTPUTTYPE)'
OGSound.cpp:(.text+0x7fe): undefined reference to
FMOD::System::init(int, unsigned int, void*)’
/tmp/ccwTXhuX.o: In function FMOD::System_Create(FMOD::System**)':
OGSound.cpp:(.text._ZN4FMOD13System_CreateEPPNS_6SystemE[FMOD::System_Create(FMOD::System**)]+0xd): undefined reference to
collect2: ld returned 1 exit status

Is there reference material?[/code]

  • You must to post comments

You seem to be missing linking with the fmod lib.

If you take a look at the examples directory you can see the Makefiles we ship, they have the command line params to compile and link with FMOD.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.