Accessing GMP dylib

Hi all,
I’ve installed GMP on my Mac via Homebrew. A little test using the Terminal results successfuly.
Then, I tried to code a sample test in Xojo, using Declare, with a System.IsFuntionAvailable before calling the dylib. Unfortunately, it’s always false.
The dylib is in this folder : /usr/local/Cellar/gmp/6.3.0/lib/libgmp.dylib and accessible via /usr/local/opt/gmp/lib/libgmp.10.dylib, in addition.
How should I declare the function ? For example:

Declare Sub mpz_init Lib “/usr/local/opt/gmp/lib/libgmp.10.dylib” (z As Ptr)

Or something else ?

TIA for any advice, information or code sample.

Jean-Luc

All I can offer here is that the very first iteration of ExeWrapper required installing libraries with Homebrew and it did work. I eventually learned how to bundle libraries into the Xojo application but it required building the dylib correctly.

As a total shot in the dark have you tried using the dylib in the Cellar and not what was put in /usr/local/opt?

Hi Tim,
Thanks for replying.
Yes, I tried both paths, none is working.
But it works correctly in the Terminal, using a little code test as text file compiled with GCC.