-----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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk26djcACgkQkX2Xpv6ydvTp2gCfXCKXYXgTLNI3Tb9d2U7ATCcL j6YAoL94AgPzY1KUqC2BNPmDg7IhLI/D =VxGC -----END PGP SIGNATURE----- _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list