0

I am having trouble using the asdf build tools with common lisp. Here is my fractals.asd file:

(defpackage :fractals
  (:use :cl :asdf :cl-opengl :cl-glu :cl-glut)
  (:export :frac-tree :draw-tree))
(in-package :fractals)
;----------------------------------------------------------
(defsystem fractals 
  :name "fractals"
  :version "0.0.0"
  :serial t
  :components ((:file "frac-tree")
           (:file "fractal-lab")))

Both the ffiles fract-tree.lisp and fractal-lab.lisp have the statement (in-package :fractals) at the very beginning of the file. However, I am automatically getting an error saying The name "CL-OPENGL" does not designate any package. I don't understand why this is wrong. Furthermore, if I don't include these libraries, then I have to manually require them myself... I created a directory called: ~/.config/common-lisp/source-registry.conf.d/ where I placed a file called fractals2.conf which contains the following:

(:directory "~/lisp_proj/fractals2/")

This is the directory of my fractals.asd file as shown above. Apparently, this is supposed to tell asdf where my user-defined systems are located. I followed this tutorial.

  • In summary, how can I get asdf to find my user-defined systems so that I do not have to manually load them?

Thanks for all the help!

4

2 回答 2

2

您需要在defsystemwith:depends-on子句中声明您的依赖关系。:useonly子句使已经加载的包的defpackage名称可用,但不会加载它们。

顺便说一句,您的.asd文件不应包含defpackage 主包的。虽然声明一个特殊的包来运行其中的 s 是有意义defsystem的,但应该在.lisp文件中声明常规包。

编辑:这也可以解决您的第二个问题。如果不是,可能是因为 ASDF 不会自动扩展~路径中的字符。在这种情况下,请将其替换为您的主目录的实际路径。

于 2014-05-10T22:36:59.447 回答
0

1-看起来您使用的是未定义的分形:defsystem 而不是 asdf:defsystem

2- ASDF DSL 接受指令 (:directory (:home "lisp_proj/fractals_2"))

3- 从 3.1.2 开始,您可以将所有内容放在 ~/common-lisp/ 下

4-看在上帝的份上,RTFM!

于 2014-05-13T18:24:35.563 回答