Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-10

detecting c's calling convention

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Henry Vermaak
to ik: I'm going to bind a SIP library called sofia-sip<http://sofia-sip.sourceforge.net/>, it…
ik wrote 9 lines
Hello All, I'm going to bind a SIP library called sofia-sip <http://sofia-sip.sourceforge.net/>, it is an open source (LGPL) cross platform SIP library from Nokia. Because the binding I'm going to make will also have to work under Windows, I must know how to detect what is the calling convention in the Windows compilation side. In theory it can be stdcall, but how can I make sure of it ?

Look for function attributes in the source. If they use gcc it should be __attribute__(stdcall) or __stdcall (they may have this in a macro somewhere). If you can't find anything, the default is cdecl. I don't know what msvc uses by default.

Henry

ik
to leledumbo

Thanks all, and I hope that I will work in this headers soon and release it for everyone to have :)

Ido

LINESIP websites:
http://www.linesip.com
http://www.linesip.co.il

leledumbo wrote 12 lines
> I don't know what msvc uses by default. It's cdecl as well. The fast call is an option. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/detecting-c-s-calling-convention-tp3238344p3238776.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal