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, ob开发者_开发百科tain 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,
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.
精彩评论