Re: Clean way of generalizing CDECL
Brian Hook <[email protected]>
| Newsgroups | gmane.games.devel.general |
|---|---|
| Message-ID | <20047814752.855235@GATEWAY> |
> Most likely because you want to share many interfaces (header > files) across platforms, therefore you want declarations to include > "some" calling convention. Exactly. And it's necessary to specify calling conventions so that your library compiled with one convention is compatible with someone else's application that may have been built with __fastcall. PoshLib (www.poshlib.org) tries to solve most of these problems cleanly and portably, which is why I'm asking about this. I'm glad to find out that __attribute__((cdecl)) seems to be prefix or suffix friendly. With POSH you do: void POSH_CDECL foo( int x ); or, if you ant DLL export to work magically as well: POSH_PUBLIC_API( void ) POSH_CDECL foo( int x ); Brian ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Gamedevlists-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gamedevlists-general Archives: http://sourceforge.net/mailarchive/forum.php?forum_idU7