Possible to integrate latest SWI-Prolog with Visual Studio 2010?

Kaitain Jones <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAMeycMy7GrZbyB05QoR52oDVgZm=_69VWsw7LyZL1CT1BxNWng@mail.gmail.com>
Am attempting to do this, but almost all instructions I've found online are
based around older versions of SWIPL with a libpl.lib library to which the
linker should be pointed. The current version of SWI (Windows, 64-bit) has
instead libswipl.dll.a.

I read a thread here from last year in which Alan Baljeu suggested simply
renaming the dll file to be libswipl.lib, and that this had worked in his
particular case. I tried this, and I still get a link error:

*1>VSProject.obj : error LNK2019: unresolved external symbol _PL_initialise
referenced in function _wmain*
*1>C:\[...]\VSProject\Debug\VSProject.exe : fatal error LNK1120: 1
unresolved externals*


The C code is simply trying to initialize Prolog and do no more than that
for now:

*#include "stdafx.h"*
*
*
*#include <iostream>*
*#include <SWI-Prolog.h>*
*
*
*using namespace std;*
*
*
*int _tmain(int argc, _TCHAR* argv[])*
*{*
*
*
* static char * av[] = {"libswipl.dll", NULL};*
* if( ! PL_initialise(1,av)){*
* cout<<"error initializing"<<endl;*
* }else {*
* cout<<"success initializing!"<<endl;*
* }*
* return 0;*
*}*


I added the* /swipl/include* path as an include directory in *C++->General*,
and added* C:\Program Files\swipl\lib\libswipl.lib* as an Additional
Dependency in* Linker->General*.

But the link behaves no differently from how it would if there were no
libswipl.lib at all.

Should I expect this to work in principle? Are additional steps needed? Has
anybody got SWI working recently with Visual Studio?

Many thanks,

KJ
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.