我正在尝试学习如何使用 Common-Lisp 的 asdf,我有以下代码:
(asdf:defsystem example
:serial t
:components ((:file "first")
(:file "second")))
但是,我一直收到错误:
Condition of type: SIMPLE-ERROR
Invalid relative pathname #P"first.lisp" for component ("example" "first")
我在与这两个 Lisp 文件相同的目录中启动 repl,但我不明白为什么会出现错误。我错过了什么?我在 Windows 上使用 ECL
最佳答案
ASDF 使用*load-pathname*
或*load-truename*
来解析系统组件的完整路径。如果您在 REPL 中输入 (asdf:defsystem ...)
表单,则不会设置这些变量。
将defsystem
形式写入文件,然后像(load "example.asd")
一样加载它。
关于windows - 可嵌入的 Common-Lisp asdf :defsystem returning invalid relative pathname,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34073242/