Lispコードを使用して実行可能ファイルを作成しようとしていました。しかし、システム をロードする前にパッケージがないため、lispファイルをまったくコンパイルできませんhellowolrd
helloworld
;; test.lisp
(asdf:load-system :helloworld)
(defun main()
(helloworld:start))
もちろん、helloworld
システムを作って入れました~/quicklisp/local-projects/
。helloworld
システムはエラーなしで正常にロードされました。
;; ~/quicklisp/local-projects/helloworld/helloworld.asd
(asdf:defsystem helloworld
:version "1.0"
:components ((:file "package")))
;; ~/quicklisp/local-projects/helloworld/package.lisp
(defpackage :helloworld
(:use :common-lisp :asdf)
(:export :start))
(in-package :helloworld)
(defun start()
(format t "Welcome, ASDF"))
test.lisp
明示的なロードなし
でコンパイルしたい。私も挑戦use-package
しdefpackage
ましたが失敗しました。
;; test.lisp
(asdf:load-system :helloworld)
(use-package :helloworld)
(defun main()
(helloworld:start))
;; test.lisp
(asdf:load-system :helloworld)
(defpackage :test
(:use :cl :asdf)
(:export :main))
(in-package :test)
(defun main()
(helloworld:start))
helloworld
システムで定義されたパッケージhelloworld
をロードせず
に使用するにはどうすればよいですか? システムを使用して新しいシステムを作成する必要がありhelloworld
ますか?