Logtalk - logtalk_load fails



我正在使用swi prolog,并且刚刚安装了logtalk。
当我用一些示例项目调用logtalk_load时,它总是返回false。

% library(win_menu) compiled into win_menu 0.00 sec, 29 clauses
%   C:Logtalk/configs/swi.pl compiled 0.02 sec, 1,539 clauses
%   C:Logtalkuserskikijiki/libpaths/libpaths.pl compiled 0.02 sec, 108 clauses
%   C:Logtalk/integration/logtalk_comp_swi.pl compiled 0.11 sec, 2,626 clauses
%   c:/logtalk/users/kikijiki/settings.pl compiled 0.00 sec, 3 clauses
Logtalk 2.44.1
Copyright (c) 1998-2012 Paulo Moura
Default lint compilation flags: 
  unknown: warning, misspelt: warning, lgtredef: warning, plredef: silent
  portability: silent, missing_directives: warning
  singletons: warning, underscore_variables: singletons
Default documenting compilation flags:
  xmldocs: on, xmlspec: dtd, xmlsref: local, xslfile: lgtxml.xsl
Default directories compiler flags:
  altdirs: on, tmpdir: lgt_tmp/, xmldir: xml_docs/
Default optional features compiler flags:
  complements: deny, dynamic_declarations: deny
  context_switching_calls: allow, events: deny
Other default compilation flags:
  startup_message: flags, report: on
  code_prefix: $, hook: (none defined)
  optimize: off, source_data: on, debug: on
  clean: on, smart_compilation: off, reload: always
Back-end Prolog compiler and loader flags:
  prolog_compiler: []
  prolog_loader:   []
Read-only compilation flags (back-end Prolog compiler features):
  prolog_dialect: swi, break_predicate: supported, modules: supported
  threads: supported, encoding_directive: full, tabling: unsupported
  coinduction: supported
Loaded settings file found on directory c:/Logtalk/users/kikijiki.
%   C:Logtalk/configs/swihooks.pl compiled 0.02 sec, 212 clauses
%    library(quintus) compiled into quintus 0.00 sec, 54 clauses
%    library(pce) loaded into pce 0.02 sec, 778 clauses
%   C:Logtalk/configs/xpcehooks.pl compiled 0.02 sec, 785 clauses
%  c:Logtalkintegrationlogtalk_swi.pl compiled 0.17 sec, 5,302 clauses
% c:/users/kikijiki/appdata/roaming/swi-prolog/pl.ini compiled 0.17 sec, 5,305 clauses
XPCE 6.6.66, July 2009 for Win32: NT,2000,XP
Copyright (C) 1993-2009 University of Amsterdam.
XPCE comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
The host-language is SWI-Prolog version 6.2.6
For HELP on prolog, please type help. or apropos(topic).
         on xpce, please type manpce.
1 ?- logtalk_load('c:/logtalk/examples/people/loader').
% <<< loading source file c:/logtalk/examples/people/loader.lgt... 
% >>> compiling source file c:/logtalk/examples/people/loader.lgt in debug mode...
false.

我做错了什么?

今后请使用官方Logtalk支持渠道寻求帮助。你会得到及时的回复。

Logtalk 2.44.1不支持logtalk_compile/1-2logtalk_load/1-2谓词中的完整或相对(除了当前目录中的文件)文件路径(请参阅参考手册中的这些谓词)。在上面的例子中,要加载"people"编程示例,输入:

?- logtalk_load(people(loader)).

或:

?- {people(loader)}.

这叫做(在Logtalk文档中)"库符号"(在Prolog中也有)。查看"examples/people"文件夹中的"NOTES.txt"one_answers"SCRIPT.txt"获取更多详细信息(所有示例都包含这两个文件并提供有用信息)。

顺便说一句,在Logtalk 3中可以使用相对和完整的源文件路径。

相关内容

  • 没有找到相关文章

最新更新