logo       

C++ interface: msg#00043

Subject: C++ interface
Hi there

I'm trying to use the SWI_Prolog V5.2.13 foreign language interface with Borland C++ Builder V5.0 and I'm having a few problems.

When I try to embed prolog into a c++ application I get the error:

[C++ Error] testProlog.cpp(30): E2268 Call to undefined function 'PL_inifialise'

I have used implib successfuly and libpl.lib has been added to the project, I have set the environment path, both in Autoexec.bat and in the code. I have set the calling conventions to standard in the project compiler options (although I cannot find the multi thread switch). I've included SWI-cpp.h and SWI-Prolog.h in that order.

I'm also trying to create a Prolog extension dll, also in Borland Builder and having problems with that too. I've created a dll project and libpl.lib has been imported into this project, calling convention set to standard and I've included SWI-Prolog.h and SWI-Stream.h (with SWI-Stream.h included first as stated in the documentation). This time the errors appear in SWI-Prolog.h, these are the error messages I get. I'm using the Hello World example from the docs.

[C++ Error] SWI-Prolog.h(533): E2138 Conflicting type modifiers
[C++ Error] ExtTst.cpp(8): E2303 Type name expected
[C++ Error] ExtTst.cpp(8): E2451 Undefined symbol 'hello'
[C++ Error] ExtTst.cpp(8): E2293 ) expected
[C++ Error] ExtTst.cpp(19): E2141 Declaration syntax error

Help with this would be greatly appreciated.

Thanks

Mark Bennett



------------
For further info, please visit http://www.swi-prolog.org/

To unsubscribe, send a plaintext mail with "unsubscribe prolog <e-mail>"
in its body to majordomo@xxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>