0
0

Ok this isnt the standard "it wont link with MinGW" post that I have read numerous times on this forum. I know that ‘other’ compilers are not supported by FMOD Ex, but my question is a little different.

I had my code working at one point in time with FMOD Ex and MinGW and Borland, I purged my application of all FMOD code for various reasons, and decided to try again a year later by rewriting the code from scratch.

Now I get the linking errors. All the code is new, based on the examples. From memory, the code all looks pretty similar to what I had a year ago, but I cannot be certain, obviously something has changed in my code.

I use code like the following:

FMOD::System *FMOD_SND_SYSTEM;
FMOD::Channel *channel;
FMOD_RESULT result;
FMOD::Sound *bgm_snd;

result = FMOD::System_Create(&FMOD_SND_SYSTEM); 
result = FMOD_SND_SYSTEM->setOutput(FMOD_OUTPUTTYPE_AUTODETECT); 
ERRCHECK(result);
result = FMOD_SND_SYSTEM->init(32, FMOD_INIT_NORMAL, 0); 

How does my code have to change for FMOD Ex to work with MinGW? And are there any compiler specific flags needed?

  • You must to post comments
0
0

You need to use the C API in order to work with MinGW.

So, your code becomes:
[code:3s23dswp]FMOD_SYSTEM *FMOD_SND_SYSTEM;
FMOD_CHANNEL *channel;
FMOD_RESULT result;
FMOD_SOUND *bgm_snd;

result = FMOD_System_Create(&FMOD_SND_SYSTEM);
result = FMOD_System_setOutput(FMOD_SND_SYSTEM, FMOD_OUTPUTTYPE_AUTODETECT);
ERRCHECK(result);
result = FMOD_System_init(FMOD_SND_SYSTEM, 32, FMOD_INIT_NORMAL, 0);
[/code:3s23dswp]

The C API is in the documentation, but you can match the C++ API stuff to the C API pretty easily.
FMOD:: -> FMOD_
Foo->Function() -> FMOD_Type_Function(Foo)

Hope that helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.