0
0

I’m new to fmod and i was trying to compile my very frist program with fmod, this is my code (copy&paste form the tutorial):

[code:8a5qky7o]

include <stdio.h>

include <stdlib.h>

include "fmod.hpp"

include "fmod_errors.h"

int main()
{
FMOD_RESULT result;
FMOD::System *system;
result = FMOD::System_Create(&system); // Create the main system object
if (result != FMOD_OK)
{
printf("FMOD error! (%d) %s\n", result, FMOD_ErrorString(result));
exit(-1);
}

result = system-&gt;init(100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
if (result != FMOD_OK)
{
    printf(&quot;FMOD error! (%d) %s\n&quot;, result, FMOD_ErrorString(result));
    exit(-1);
}

return 0;

}
[/code:8a5qky7o]

I’m using code::blocks with mingw on windows, and when i try to build i get this error:

obj\Release\main.o:main.cpp:(.text+0x389): undefined reference to `FMOD::System::init(int, unsigned int, void*)@16′

although i’ve linked libfmodex.a…

how can i fix it?

  • You must to post comments
0
0

You cannot use the C++ interface with MinGW (due to mangled symbols), you will need to use the C interface instead.

For more details, check the documentation under "Platform specific issues"->"Windows".

  • You must to post comments
0
0
  • You must to post comments
0
0

oh… thank you… i’ll use the c interface..

Fabiano

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.