我可以用SWI prolog在windows上构建崇高的文本吗?
我尝试过的是:我在这里使用包控件来安装Prolog包:https://github.com/alnkpa/sublimeprolog,我已经安装了SWI,但是我无法构建。也许swi的文件路径或名字是错误的?
提前感谢!
/JC
我知道这个错误:
[WinError 2] File not found (Det går inte att hitta filen)
[cmd: ['swipl', '-f', '', '-t', 'main', '--quiet']]
[dir: C:\Program Files\Sublime Text 3]
[path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\MATLAB\R2014b\runtime\win64;C:\Program Files\MATLAB\R2014b\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft Data Protection Manager\DPM\bin\VDDK\bin\]
[Finished]根据Danilo的建议,我确保保存了一个包含主要功能的文件。但我还是会犯同样的错误。有什么想法吗?
[WinError 2] File not found
[cmd: ['swipl', '-f', 'testa.pl', '-t', 'main', '--quiet']]
[dir: C:\Users\psyk-jcr\Documents\Forskning\Prolog meta-analys\Kod]
[path: C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\MATLAB\R2014b\runtime\win64;C:\Program Files\MATLAB\R2014b\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Microsoft Data Protection Manager\DPM\bin\VDDK\bin\]
[Finished]发布于 2018-09-30 15:18:49
这是因为构建文件没有很好的位置,您需要从包管理器安装(PackageResourceviewer):1-从工具选项卡选择命令选项板或(ctrl+shift+p) 2-搜索: PackageResourceviewer:打开资源并选择它3-搜索您的包在我们的情况下prolog和选择它4-选择序言.升华-构建5-
{
"cmd": ["swipl", "-f", "$file_name", "-t", "main", "--quiet"],
"working_dir": "$file_path",
"file_regex": "^Warning: (.+):([0-9]+)",
"selector": "source.prolog"
}将swipl更改为swiple编译器的主目录,您需要在开始时添加main:-
main:-
likes("Name", "Another").
likes("Name","Another") :- likes("Ahmed", "Another").发布于 2018-11-13 07:52:25
我终于解决了我的问题。正如@Ahmed所建议的那样,我更新了我的序言。就我而言:
{
"cmd": ["C:\\Program Files\\swipl\\bin\\swipl", "-f", "$file_name", "-t", "main", "--quiet"],
"working_dir": "$file_path",
"file_regex": "^Warning: (.+):([0-9]+)",
"selector": "source.prolog"
}发布于 2017-04-18 12:08:18
似乎您还没有将程序保存在文件中。看这里
[cmd:'swipl','-f','','-t','main',‘-安静’]
您的sublime构建系统已准备好与main/0子句统一。所以你的程序入口点应该是
main :-
write("hello, world!\n").https://stackoverflow.com/questions/41635101
复制相似问题