I encountered error:
"FATAL ERROR: Could not find system resources"
I then added the following code:
putenv("SWI_HOME_DIR=/usr/lib/swi-prolog");
I ran into another problem of:
"$c_call_prolog...Undefined procedure"
(More details here)
I ran the below command on Ubuntu 10.12
sudo apt-get install swi-prolog build-essential.
I wrote a simple C
program to test it but was not able to retrieve the return value from prolog
. Suppose I want to interact with mortal.pl
, I compiled with:
swipl-ld -o mmm mortal.c mortal.pl
no error but like I mentioned. I did not get what I expected.
I obtained another code, nothing weird on the code. This time I got the first error. It seems that if swi-prolog is set to that directory, it won't search for my predicate.
Where and what should I set this SWI_HOME_DIR
?