Foreign interface
bishoksan kafle <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAMEeYky_Q5p5UbHy80TSvqOFq=VPOrRXN=WxrwjdGHDKQihGQQ@mail.gmail.com> |
Hi,
I have .dyld (may be .dll/.so) shared library. I could like to invoke
some function in this library from swi-prolog, can you please brief me on
how can I do this?
In the swi-prolog webpage it comes with an example, but I could not really
follow it. I do not have any source file and I can not understand where can
I put install sth.?
In my case, I am trying to make an interface with SMT solver z3, suppose
that I only have .dyld (shared library). The command to run for this is z3.
I tried this: :- use_foreign_library('/usr/local/lib/libz3', z3).
I get the following message back:
No install function in '/usr/local/lib/libz3.dylib'
Tried: [z3]
Warning: /Users/kafle/Desktop/z3-ciao/swi.pl:2:
Goal (directive) failed: user:use_foreign_library(/usr/local/lib/libz3,z3)
can you please show me how this could be achieved (consider that there is a
function called "say_hello" inside this shared lib, how do I invoke it)?
Many thanks in advance
bishoksan
--
The race is not always won by the fastest runner, but sometimes by those
who just keep running.
-------------- next part --------------
HTML attachment scrubbed and removed