0
0

Hi all :) !
I’ve just dowload and install FMOD Ex, but i have problem to use it :oops:.

That’s is the error returned by CodeBlock:
[quote:3k95ewtr]obj\Debug\main.o(.text+0x190)||In function main':|
C:\CPP\Music Player\MusicPlayer\main.cpp|18|undefined reference to
_ZN4FMOD6System4initEijPv@16’|
||=== Build finished: 1 errors, 0 warnings ===|
[/quote:3k95ewtr]

And here my code:
[code:3k95ewtr]#include <iostream>

include <FMOD/fmod.h>

include <FMOD/fmod.hpp>

using namespace std;

int main()
{
FMOD_RESULT result;
FMOD::System *system;
result = FMOD::System_Create(&system);

if (result != FMOD_OK) {
    cout &lt;&lt; &quot;Erreur System_Create: &quot; &lt;&lt; result &lt;&lt; endl;
    exit(EXIT_FAILURE);
}

result = system-&gt;init(50, FMOD_INIT_NORMAL, 0);
if (result != FMOD_OK) {
    cout &lt;&lt; &quot;Erreur Init: &quot; &lt;&lt; result &lt;&lt; endl;
    exit(EXIT_FAILURE);
}

return EXIT_SUCCESS;

}
[/code:3k95ewtr]

And I have link the "libfmodex.a" in build option…
Can one help me ? ๐Ÿ˜€

Thank you & good evening ๐Ÿ˜‰

[u:3k95ewtr]BloodyDark[/u:3k95ewtr].

  • You must to post comments
0
0

You can’t use the C++ interface with gcc-based compilers (like MinGW). Have a look at the thread in the FMOD Ex Frequently Asked Questions forum.

You’ll have to use the C API, which is basically identical to the C++ API, but with underscores replacing ::. So it would be FMOD_System_Init() instead of FMOD::System::init().

  • G
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.