Closed manubatura closed 8 years ago
You may need foreign_t install_hello()
. That is at least the normal way. I'm also unsure about the link flags. Try using swipl-ld
for the compile/link. If that fails in the installation, try at least
swipl-ld -v <args>
to see how it calls gcc for the Mac.
Hi Jan,
Thanks for getting back so quickly on this. Your suggestion of using -v with swipl-ld worked. swipl-ld by itself failed, but I used the flags for MAC that swipl-ld using with gcc and it worked. Thanks a lot for your help here.
Regards, Manu
I am able to load a compiled foreign library but not able to see the predicates defined in the foreign library. Can someone help here.
Environment:
Platform: Macintosh Operation System: OSX-Yosemite SWI-Prolog: Pre-built available from swi-prolog.org (Multi-threaded, 64 bits, Version 7.2.3) gcc: 4.2.1
Foreign Module source code:
hello.c
Building the library:
When I load the foreign library, it loads fine. However, I cannot see the say_hello/1 predicate.