0
0

Sorry for newbie question. New to C++, new to FMOD. Just trying to add some sound to a video game I’m attempting to make.

I downloaded the latest fmod ex directories.

Relevant code:

include "fmod/api/inc/fmod.hpp"

include "fmod/api/inc/fmod_errors.h"

include "fmod/examples/common/wincompat.h" //Only included this line because the examples did

….

int main(int argc, char argv[])

FMOD::System
system;
FMOD_RESULT result;

result = FMOD::System_Create(&system);

At this point, my code breaks. It doesn’t break for the #include lines, and it allows the creation of the FMOD::System* and the FMOD_RESULT.

Error:
In function FMOD::System_Create(FMOD::System**)':
fmod/api/inc/fmod.hpp:45: undefined reference to
FMOD_System_Create’

Been searching around as to what I’m missing, but can’t figure it out. Can someone help this newbie start his code?

  • You must to post comments
0
0

Firstly you don’t need wincompat.h, that’s just a little helper we have in our examples to make the code work on other platforms.

Your undefined symbol error is most likely related to not linking the FMOD library, if you are on Linux (a guess based on the wincompat.h) take a look at our makefiles to ensure you link the library correctly.

  • You must to post comments
0
0

Whoops! Didn’t include fmod/api/lib/libfmodex64.so in the Makefile

Thanks for the quick fix!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.