-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 04/29/2011 12:25 AM, Patrice Colet wrote:
I've explored a bit the source files of pd-extended externals and didn't see a single one with .cpp extension available on windows, the solution I've found is ugly
#ifdef NT extern "C" __declspec(dllexport) void readanysf_tilde_setup(void) { #else extern "C" void readanysf_tilde_setup(void) { #endif
the canonical way to do it would be:
<header> #ifdef _WIN32 # define READANYSF_EXTERN __declspec(dllexport) #else # define READANYSF_EXTERN #endif </header>
<source> extern "C" READANYSF_EXTERN void readanysf_tilde_setup(void) </source>
this is basically the same as Pd's EXTERN macro (though the latter also handles dllimport, which you only need if your library provides functions for other libraries)
mfgasdr IOhannes