using additional C libraries via FFI

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
casm
Posts: 3
Joined: Fri Sep 04, 2009 10:40 pm

using additional C libraries via FFI

Post by casm » Mon Mar 30, 2020 4:07 pm

I would be grateful for help with an addressing issue.

I have managed to get FFI working with AToF in the OSX C standard library and with one or two functions in OSX libm library.

I have an external C library on my Macbook Pro (OSX 10.14.6) in the /usr/local/include/ directory and would like to access this using LCB and the FFI.

I have tried putting this folder in the $PATH, and symlinking it to /usr/lib/ without success.

Any ideas would be welcome.

Colin

PaulDaMacMan
Posts: 616
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: using additional C libraries via FFI

Post by PaulDaMacMan » Tue Mar 31, 2020 8:38 pm

Not 100% sure, but if it's a dynamic linked lib then maybe try putting the foreign lib in Your_LCB_Project_Folder/code/x86_64-mac/
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

casm
Posts: 3
Joined: Fri Sep 04, 2009 10:40 pm

Re: using additional C libraries via FFI

Post by casm » Tue Mar 31, 2020 9:34 pm

Thanks for the hint, Paul. I'll give that a try and report back.

Colin

casm
Posts: 3
Joined: Fri Sep 04, 2009 10:40 pm

Re: using additional C libraries via FFI

Post by casm » Wed Apr 01, 2020 5:46 pm

:D Managed to sort it. In the end the issue was with access to shared libraries.

Thanks, Paul, for your input.

Post Reply

Return to “LiveCode Builder”