views:

78

answers:

1
+1  Q: 

plld Prolog C++

I have a large Prolog program with lots of predicates. I need to connect to this Prolog code from C++ (VS2008) to obtain certain query results. So I am not trying to embed Prolog in C++ as a logicasl engine, but for my C++ program to connect to my Prolog code, consult (compile) it, obtain query results, and pass them back to C++.

Running the following command at the VS2008 Command Prompt generates so many errors:

plld -o myprog.exe mycpp.cpp mypl.pl

Is there any way I can get my C++ program to consult my Prolog program, by including a command or makefile, etc...?

I am aware that if you use VS2008, you are better off not using plld, so I am trying to include everything in one master C++ program, then press F5 to build and compile, and then call Prolog, then C++, and so on...

Cheers,

A: 

You probably have to pass the necessary compiling and linking flags to plld that it will pass to your VC++ compiler. The graphical interface automatically calls the compiler with a lot of flags, like include path and such, which you have to figure out first. Look under the project properties.

petersohn
Thanks. I've been through the Project Properties. I'm not trying to avoid using VS2008 IDE. I'm only trying to avoid using plld at the prompt (to compile my Prolog and C++ codes against each other). But obviously I need to do it in my code, perhaps through a dll. Can you tell me in detail how I can make a dll for a VS2008 Solution file please?
HosseinJoshua MIRI