我正在尝试使用CLX同时学习常见的lisp,因为我认为如果我有一个实际的,有形的,实际的结果,它会更有效。不幸的是,我无法让CLX工作。在debian中安装clisp
和clisp-module-clx
软件包之后,我跟踪了the first bit of this tutorial。
我认为我只是误解了clisp的软件包/模块/加载系统,但我找不到任何资源来解决这个问题。
foo.lisp :
(defun pop-up-window (life-time &optional (host ""))
(let* ((display (xlib:open-display host))
(screen (first (xlib:display-roots display)))
(root-window (xlib:screen-root screen))
(my-window (xlib:create-window
:parent root-window
:x 0
:y 0
:width 200
:height 300)))
(xlib:map-window my-window)
(xlib:display-finish-output display)
(format t "it should be here ~%")
(sleep life-time)
(xlib:destroy-window my-window)
(xlib:close-display display)
)
(pop-up-window 10)
输出:there is no package with name "XLIB"
修改
我在代码开头尝试了(require "clx")
,但我得到#<PACKAGE COMMON-LISP> is locked
。