首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用崇高文本3构建SWI prolog项目

使用崇高文本3构建SWI prolog项目
EN

Stack Overflow用户
提问于 2017-01-13 12:51:56
回答 3查看 5.1K关注 0票数 2

我可以用SWI prolog在windows上构建崇高的文本吗?

我尝试过的是:我在这里使用包控件来安装Prolog包:https://github.com/alnkpa/sublimeprolog,我已经安装了SWI,但是我无法构建。也许swi的文件路径或名字是错误的?

提前感谢!

/JC

我知道这个错误:

代码语言:javascript
复制
    [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的建议,我确保保存了一个包含主要功能的文件。但我还是会犯同样的错误。有什么想法吗?

代码语言:javascript
复制
[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]
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2018-09-30 15:18:49

这是因为构建文件没有很好的位置,您需要从包管理器安装(PackageResourceviewer):1-从工具选项卡选择命令选项板或(ctrl+shift+p) 2-搜索: PackageResourceviewer:打开资源并选择它3-搜索您的包在我们的情况下prolog和选择它4-选择序言.升华-构建5-

代码语言:javascript
复制
{
    "cmd": ["swipl", "-f", "$file_name", "-t", "main", "--quiet"],
    "working_dir": "$file_path",
    "file_regex": "^Warning: (.+):([0-9]+)",
    "selector": "source.prolog"
}

将swipl更改为swiple编译器的主目录,您需要在开始时添加main:-

代码语言:javascript
复制
main:-
    likes("Name", "Another").
    likes("Name","Another") :- likes("Ahmed", "Another").
票数 4
EN

Stack Overflow用户

发布于 2018-11-13 07:52:25

我终于解决了我的问题。正如@Ahmed所建议的那样,我更新了我的序言。就我而言:

代码语言:javascript
复制
{
    "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"
}
票数 1
EN

Stack Overflow用户

发布于 2017-04-18 12:08:18

似乎您还没有将程序保存在文件中。看这里

[cmd:'swipl','-f','','-t','main',‘-安静’]

您的sublime构建系统已准备好与main/0子句统一。所以你的程序入口点应该是

代码语言:javascript
复制
main :-
    write("hello, world!\n").
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41635101

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档