0
0

Hello everyone,

I have been using Code::Blocks for the past few weeks, and everything has been working like a charm until yesterday. For some unknown reason, I tried using the "Rebuild" button, which I had never used before. Sadly, ever since I pressed that button, I can’t compile any project using FMOD anymore…
Here is the message the IDE outputs :
[img:esr52n5g]http://img100.imageshack.us/img100/2172/fmodissue.png[/img:esr52n5g]

And here is the source code (there are only the basics here) :
[code:esr52n5g]#include <stdio.h>

include <stdlib.h>

include <fmodex/fmod.h>

int main()
{
FMOD_SYSTEM *system=NULL;
FMOD_SOUND *son=NULL;
FMOD_System_Create(&system);
FMOD_System_Init(system, 2, FMOD_INIT_NORMAL, NULL);

FMOD_System_CreateSound(system, &quot;SFX/son.wav&quot;, FMOD_CREATESAMPLE, NULL, &amp;son);
FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sout, 0, NULL);

FMOD_Sound_Release(son);
FMOD_System_Close(system);
FMOD_System_Release(system);

printf(&quot;FMOD fonctionne !\n&quot;);
return 0;

}[/code:esr52n5g]

There is no RPT file generated by CB. I have tried to compile projects using other libraries and they work well.

I have properly linked the library with the project, and the runtime DLL is in the project’s folder. Once again, the project compiled perfectly well [b:esr52n5g]until I decided to press the "Rebuild" button[/b:esr52n5g].

I am using the latest Code::Blocks available in the Downloads page, provided with the mingw compiler. I am using the GCC compiler. I have tried re-installing Code::Blocks but that did not work. I have also set-up a fresh FMOD install, no luck there either. I downloaded the latest version of FMOD available [url=http://www.fmod.org/fmod-downloads.html#FMODExProgrammersAPI:esr52n5g]here[/url:esr52n5g].

Thanks in advance,

Alex

  • You must to post comments
0
0

It looks like the FMOD header doesn’t know what F_CALLBACK is, which means the ‘if defined’ checks at the start of fmod.h isn’t matching any platform. Try adding ‘WIN32’ to your preprocessor defines.

  • You must to post comments
0
0

I have the exact same problem and tried adding WIN32 as a preprocessor define to no avail. I even tried commenting out the if defined block while leaving the WIN32 specific defines in and it still gives the same errors. :(

  • You must to post comments
0
0

I changed this inside of fmod.h

[code:j169yjol]#elif defined(WIN32) || defined(_WIN32) || defined(WIN32) || defined(_WIN64)
#define F_CDECL _cdecl
#define F_STDCALL _stdcall
#define F_DECLSPEC __declspec
#define F_DLLEXPORT ( dllexport )[/code:j169yjol]
to

[code:j169yjol]#elif defined(WIN32) || defined(_WIN32) || defined(WIN32) || defined(_WIN64)
#define F_CDECL _cdecl
#define F_STDCALL __stdcall
#define F_DECLSPEC __declspec
#define F_DLLEXPORT ( dllexport )[/code:j169yjol]
and now it compiles.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.