c syntax error question

Posted By: Reconnoiter

c syntax error question - 02/06/17 15:24

Hello,

I get an syntax error in SED with this code:

Code:
#if defined(_WIN32) || defined(__CYGWIN__)


in
Code:
#if defined(_WIN32) || defined(__CYGWIN__)
    #define F_CALL __stdcall


Should be c compatible right?

(It is from one of the header files of FMOD libraries (latest version) that I am trying to integrate in my gs3d project. I have had some communication with one FMOD staff and it should be possible to integrate it.)
Posted By: Kartoffel

Re: c syntax error question - 02/06/17 16:17

I suspect that the lite-c precompiler works a bit differently, but I'm not sure.

a simple workaround should be:
Code:
#ifdef _WIN32
   #define F_CALL __stdcall
#endif

#ifdef __CYGWIN__
   #define F_CALL __stdcall
#endif


(edit: other compilers might not like the double "#define F_CALL" but lite-c should work)

I think I already said that, but in case I didn't, keep in mind that fmod can get quite expensive if you're aiming to sell your game / application.
Posted By: Reconnoiter

Re: c syntax error question - 02/06/17 16:43

Thanks that worked.

Quote:
I think I already said that, but in case I didn't, keep in mind that fmod can get quite expensive if you're aiming to sell your game / application.
, yeah but thanks its a good point. Since I got another string different errors after fixing these I think I will stop using Fmod with gs3d and limit the sound variation types. So I can use audio software like Audacity to change and save the sounds beforehand without getting to much sound files in the project.
© 2024 lite-C Forums