[Lazarus] OSX Dynamically-linked Libraries Need cdecl Exports

Dmitry Boyarintsev skalogryz.lists at gmail.com
Tue Apr 14 18:23:58 CEST 2015


On Tue, Apr 14, 2015 at 11:02 AM, ADTEC (Pty) Ltd <adtec at adtec.co.za> wrote:

> Anyone else had this problem?
>
It's not a problem it's rather a common convention.

Windows platform is using stdcall for dynamic libraries.
Unix platforms (OSX included) is using cdecl.

An example OpenGL binding in FPC are working fine this way.

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?
>

Try to put the library into:
youprogram.app/Contents/Frameworks/

https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150414/5764d8e8/attachment-0003.html>


More information about the Lazarus mailing list