Page 1 of 1

using additional C libraries via FFI

Posted: Mon Mar 30, 2020 4:07 pm
by casm
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

Re: using additional C libraries via FFI

Posted: Tue Mar 31, 2020 8:38 pm
by PaulDaMacMan
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/

Re: using additional C libraries via FFI

Posted: Tue Mar 31, 2020 9:34 pm
by casm
Thanks for the hint, Paul. I'll give that a try and report back.

Colin

Re: using additional C libraries via FFI

Posted: Wed Apr 01, 2020 5:46 pm
by casm
:D Managed to sort it. In the end the issue was with access to shared libraries.

Thanks, Paul, for your input.