gpt4 book ai didi

sublimetext3 - 使用 Sublime text 3 构建 SWI 序言项目

转载 作者:行者123 更新时间:2023-12-04 05:23:02 25 4
gpt4 key购买 nike

我可以在 windows 的 sublime text 中使用 SWI prolog 构建吗?

我尝试过的:我使用包控制在这里安装 Prolog 包: https://github.com/alnkpa/sublimeprolog我安装了 SWI 序言,但无法构建。可能是 swi 的文件路径或名称错误?

提前致谢!

/杰西

我收到这个错误:

    [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]

最佳答案

发生这种情况是因为构建文件没有正确放置,您需要从包管理器安装 (PackageResourceviewer) 然后:1- 从工具选项卡中选择命令调色板或 (ctrl+shift+p)2- 搜索:PackageResourceviewer:打开资源并选择它3- 在我们的案例序言中搜索您的包并选择它4- 选择 prolog.sublime-build5-

{
"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").

关于sublimetext3 - 使用 Sublime text 3 构建 SWI 序言项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41635101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com