0
votes

I'm trying to get SWI-prolog and C talking to each other. I have some Dynamic Programming problems that are much faster/simpler in C, and I'd like to be able to call them from prolog.

Ther SWi manual gives details on how to do this at http://www.swi-prolog.org/pldoc/doc_for?object=section%282,%279.2%27,swi%28%27/doc/Manual/foreignlink.html%27%29%29, but it requires that you link/load your program with plld.

I installed X-Code on my machine, and re-installed SWI, but I can find no plld program. I tried installing swi-prolog-devel through mac-ports, but it fails. I think it fails because SWI from the .pkg is already installed, and they conflict.

Does anybody know how to either 1. Install the developer tools for SWI? or 2. Uninstall the SWI version from the pkg on their website, so that I can reinstall it using MacPorts?

1
I've never had to use plld on OSX. Creating a dylib from XCode works fine.Nick Main
How do I do that? I'm used to using gcc, so xcode is somewhat new to me.jmite

1 Answers

1
votes

Use the -f option for the port command. I.e. type type "sudo port -f install swi-prolog-devel".