SwiPICs.dll PlEngine.Initialize FileNotFoundException [英] SwiPICs.dll PlEngine.Initialize FileNotFoundException

查看:89
本文介绍了SwiPICs.dll PlEngine.Initialize FileNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于教育目的,我们的一门大学课程要求一个项目,该项目将Prolog的任何实例与任何其他GUI支持语言集成在一起.我选择了C#,因为我对此有最丰富的经验. 我想以高年级的同事为榜样学习.他们给了我他们的存储库,以下载他们的代码,并查看它们如何结合在一起.这就是问题开始的地方.

For educational purposes, one of our college subjects requires a project that integrates any instance of Prolog with any other GUI supportive language. I went with C# as I have the most experience with it. I'm trying to learn by example of my fellow college colleagues from higher years. They gave me their repos to download their code and to see how it all comes together. And this is where the problems started.

无论我做什么,我遵循什么教程,应用了其他来源的提示,该错误都不会更改:FileNotFoundException未处理:SwiPlCs.dll中发生了'System.IO.FileNotFoundException'类型的未处理异常.

No matter what I do, what tutorial I follow, what tips from other sources I apply, the error will not change: FileNotFoundException was unhandled: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in SwiPlCs.dll.

我尝试使用32位/64位SWI,VS 2015/2017和32/64位版本,将DLL作为nuget包重新下载.他们似乎都不起作用.

I've tried using SWI 32 bit/64 bit, VS 2015/2017 with 32/64 bit builds, redownloading the DLL as a nuget package. None of them seem to work.

        InitializeComponent();
        igra.popuniSlagalicu += igra_popuniSlagalicu;
        igra.vratiOdgovor += igra_vratiOdgovor;
        String[] param = { "-q" };
        PlEngine.Initialize(param);
        PlQuery.PlCall("use_module(sudoku)");

这是我第一次尝试调试代码时感到无助和绝望.从字面上看,单行停留了5天,没有任何进展.

This is the first time I felt helpless and desperate while trying to debug code. Literally stuck on a single line for 5 days without any progress whatsoever.

推荐答案

该错误不是很明显,但是是由于程序需要知道在哪里可以找到运行SWI-Prolog的DLL所致.有几种方法可以执行此操作,但最简单的方法是将包含SWI-Prolog可执行文件(swipl-win.exe)的目录(例如C:\Program Files\swipl\bin)添加到Windows系统PATH变量.

The error is not very clear, but is caused by the fact that the program needs to know where to find the DLLs that run SWI-Prolog are located. There are a few ways to do this but the simplest is to add the directory (e.g. C:\Program Files\swipl\bin) containing the SWI-Prolog executable (swipl-win.exe) to the Windows system PATH variable.

更改系统PATH变量后,如有必要,您将需要重新启动Visual Studio.

After changing the system PATH variable you will need to restart Visual Studio if necessary.

这篇关于SwiPICs.dll PlEngine.Initialize FileNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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