Re: interface to c
Alan Baljeu <[email protected]> Fri, 25 Apr 2014 07:48:52 -0700 (PDT)
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
You say "doesn't communicate well with C", but I don't know why you make that statement. The manual for the C interface is here: http://www.swi-prolog.org/pldoc/man?section=foreign It works. I find the C++ version of this easier to use because of classes and automatic conversion, but the C version is complete. If you need more explanation, it will help to know how you want to use it. Do you want to create a DLL that Prolog loads? Or do you want to load Prolog as a DLL? In either case, you will #include <swi-prolog.h> and link a SWIPL library. The API hasn't changed much between versions so just build your program with 6.2.6. When you need to switch versions, simply install the other version and work with its files instead. Alan Baljeu ________________________________ From: 武桂鑫 <[email protected]> To: [email protected] Sent: Thursday, April 24, 2014 10:41:48 PM Subject: [SWIPL] interface to c Hello, I am a post graduate student of Shanghai University and working on the swi-prolog. At present, I need to make an interface between c and prolog, but delayed by different version. As you know, the present version of swi-prolog doesn’t communicate well with C, but I need to work on the VC2010 in some sort of reason. The problems which I am meeting is as follows, 1. what is the best tool-chain for my version(my version is 6.2.6) 2. the example which shows the demo between swi-prolog and c. I will be very appreciate if you can provide some examples. Or you could tell my how to build it. So may I ask you for a former version of swi-prolog such as v6.1.7? In that way, I can continue my work right now without more change. I am looking forward to your write back. Thank you very much. Best wishes Your sincerely friend. Apr 25th,2014. -------------- next part -------------- HTML attachment scrubbed and removed _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog -------------- next part -------------- HTML attachment scrubbed and removed _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog