如何接口SWI Prolog的到Visual Studio 2012 [英] How to Interfacing SWI Prolog to the Visual Studio 2012

查看:511
本文介绍了如何接口SWI Prolog的到Visual Studio 2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Visual Studio接口SWI-Prolog的程序。在此之前,我用VS2010(XP),一切工作正常。然后我升级我的VS,成为VS2012(Win7的),现在我有我的代码问题

I have a program that interfacing SWI-Prolog in Visual Studio. Previously, I used VS2010 (XP) and everything works fine. Then I upgrade my VS to become VS2012 (Win7) and now I have a problem in my code.

当涉及到下面的代码:

PlEngine.Initialize(param);



它总是给我下面的异常消息:

it always gives me the following exception message:

The specified module could not be found. (Exception from HRESULT: 0x8007007E)



任何人能发现我犯什么错误,或者如果可能的话做一些修改了?我必须做的,因为升级过程

Can anybody spot what mistake that I made or if possible some modification that I have to do, due to the upgrading process?

关于我的代码附加信息:

Additional information regarding my code:


  • 我用了最新swiPLCs库(版本:1.1.60301.0)

  • 我的'参数'在我上面的代码是:字符串[]参数= {-q -f,@C:\program文件(x86)的\pl\};

  • 我已经设置PATH环境变量设置为:C:\program文件(86)\pl\和c:\program文件(x86)的\pl\bin

  • 我在我的代码此设置:Environment.SetEnvironmentVariable(SWI_HOME_DIR ,Global.g_prologLocation);

  • 我曾提到:swiPLcs.dll

  • 我已经尝试过使用SWIProlog 64位,但我还是有

  • I used the most updated swiPLCs library (version: 1.1.60301.0)
  • my 'param' in my code above is: string[] param = { "-q", "-f", @"c:\program files (x86)\pl\"};
  • I have set the path environment variable to: c:\program files (x86)\pl\ and c:\program files (x86)\pl\bin
  • I have this setting in my code: Environment.SetEnvironmentVariable("SWI_HOME_DIR", Global.g_prologLocation);
  • I had the reference to: swiPLcs.dll
  • I already tried to use the SWIProlog 64 bit, but I still have the same problem

任何帮助,非常感谢同样的问题。

Any help is really appreciated.

非常感谢

推荐答案

我终于得到了自己的答案。
与VS2010,在VS2012似乎你必须SWI-Prolog的包加入到VS2012。
因此,使用的NuGet添加SWI.Prolog包。 ?
如何

I finally got the answer myself. Unlike VS2010, In VS2012 it seems that you have to add SWI-Prolog package into VS2012. So add SWI.Prolog package using Nuget. How?

请参阅: https://nuget.org /packages/SWI.Prolog

和VS2012现在承认SWI.Prolog。

And VS2012 will recognize the SWI.Prolog now.

不管怎样,谢谢

这篇关于如何接口SWI Prolog的到Visual Studio 2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆