我使用asdf-install將ltk安裝到Steel Bank Common Lisp,但我甚至無法開始使用它V_V。下面的代碼是文檔中最簡單的例子,幾乎是逐字拷貝的。ltk(common lisp)的問題
(asdf:operate 'asdf:load-op :ltk)
(defun hello-1()
(with-ltk()
(let ((b (make-instance 'button
:master nil
:text "Press Me"
:command (lambda()
(format t "Hello World!~&")))))
(pack b))))
(hello-1)
這是錯誤信息,我從SBCL得到:
> ; in: LAMBDA NIL
; (PACK B)
;
; caught STYLE-WARNING:
; undefined function: PACK
; (WITH-LTK NIL
; (LET ((B (MAKE-INSTANCE 'BUTTON :MASTER NIL :TEXT "Press Me" :COMMAND #)))
; (PACK B)))
;
; caught STYLE-WARNING:
; undefined function: WITH-LTK
;
; compilation unit finished
; Undefined functions:
; PACK WITH-LTK
; caught 2 STYLE-WARNING conditions
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {1002A57B61}>:
There is no class named BUTTON.
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(SB-PCL::FIND-CLASS-FROM-CELL BUTTON NIL T)
缺失(第一行只是複製和粘貼錯誤?)(我認爲是這樣) –
呃..是的,謝謝 – Silvanus