I’m writing a 32k-version of Pufftris, an old tetris-clone, using OpenGL and minifmod in C++. To keep it simple I just ripped the provided example-loader, which works fine, however; When I try to wrap everything up in a class I get errors where I try to set the file-callbacks.

error C2664: ‘FSOUND_File_SetCallbacks’ : cannot convert parameter 1 from ‘unsigned int (char *)’ to ‘unsigned int (__cdecl *)(char *)’

First i tried to declare the functions as __cdecl, but it didn’t help (I get exactly the same errormsg).

I had a look in the non-mini fmod documentation and include-files and they mention something about __stdcall, apparently what you’re supposed to use if you want to send pointers to functions from a class to a c-lib; same result.

In moments of frustration and sad hacking (the not-so-famous counterpart to happy hacking) I’ve even tried to type-cast the functions to whatever the compiler wants (ie. unsigned int (__cdecl *)(char *) for the first function) w/o success.

I know that minifmod is provided as-is and with no support or warranty, but if anyone would help me solve the problem I’d be grateful.

I’m using VC++ 6.0 latest SP + Win2k.

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.