Subject: [SWIPL] Embedded prolog applications in C++

From: "Stephen Gilmour" <[email-masked]>
Date: Thu, 29 Nov 2001 19:28:06 +1100

I have been trying to get the "likes" example of using prolog as an AI
server within a C++ application working but I keep coming up against
troubles.  I have in terms of compilers Visual C++ 4.0 and Cygwin with G++.
I didn't even know how to start with using plld in cooperation with VC++
(although this is ideal) so I've been trying to use cygwin.  Unfortunately
when I compile using make it gives a long list of errors.  I've trying
reducing the obvious problems by the following:

* copying entire pl directory into cygwin directories and moving the "likes"
project into bin directory of pl.
* installing SWI-Prolog.h into the cygwin include files directory
* copying all the files in the lib dir into the bin dir.

Even then I still get the following errors:

none@ARISU ~
$ cd prolog/bin

none@ARISU ~/prolog/bin
$ make
./plld -o all -ld g++ -goal true likes.cpp likes.pl
Bad command or file name
G__~1: /out:ctmp--980965: No such file or directory
G__~1: /nologo: No such file or directory
G__~1: likes.obj: No such file or directory
% likes.pl compiled 0.00 sec, 3,468 bytes
% halt
Could not open ctmp--980965: No such file or directory
*** C:\cygwin\home\none\prolog\bin\plld.exe exit status 1
make: *** [all] Error 1

What I'm trying to do is very hacky.  Just wondering if anyone has any nice
directions for getting this to work under cygwin or VC++ or can at least
help with this error message.

Thanks very much
Stephen Gilmour