[Lazarus] OSX Dynamically-linked Libraries Need cdecl Exports

ADTEC (Pty) Ltd adtec at adtec.co.za
Tue Apr 14 17:02:07 CEST 2015


Hi List

It appears that if you want to dynamically link to a library (both
calling program and library created in Lazarus) in OSX Yosemite, any
exported functions need to use the cdecl declaration, and not StdCall.
The StdCall declarations work fine in Windows.

Lazarus 1.2.6
FPC 2.6.4
Win 7 64bit
OSX 10.10.2

Anyone else had this problem?

Also, where do you put the library? I've been copying it to /usr/lib
to get it to work. How do I store it in the MacOS or Resources
directory of the .app and have it found at run-time?

Thanks

Graham.




More information about the Lazarus mailing list