当前位置: 首页 > 工具软件 > cl-opengl > 使用案例 >

glut linux 安装包,“包GLUT不存在”,即使安装在Arch Linux的CL-的OpenGL

郝峰
2023-12-01

我有泥配置上的Arch Linux的Common Lisp(SBCL)开发的emacs。事情是,我现在也想开始使用OpenGL,所以我已经安装了cl-opengl来提供必要的绑定。我还在.local/share/common-lisp上建立了一个到/ usr/share/common-lisp的符号链接(我应该能够以这种方式使用ASDF加载所有系统)。“包GLUT不存在”,即使安装在Arch Linux的CL-的OpenGL

然而,当我尝试编译在泥下面的代码(使用抄送CK)

(require :asdf) ; need ASDF to load other things

(asdf:load-system :cl-opengl) ; load OpenGL bindings

(asdf:load-system :cl-glu) ; load GLU bindings

(asdf:load-system :cl-glut) ; load GLUT bindings

(defclass my-window (glut:window)

()

(:default-initargs :width 400 :height 300

:title "My Window Title"

:x 100 :y 100

:mode '(:double :rgb :depth)))

(defmethod glut:display-window :before ((win my-window))

(gl:shade-model :smooth) ; enables smooth shading

(gl:clear-color 0 0 0 0) ; background will be black

(gl:clear-depth 1) ; clear buffer to maximum depth

(gl:enable :depth-test) ; enable depth testing

(gl:depth-func :lequal) ; okay to write pixel if its depth

; is less-than-or-equal to the

; depth currently written

; really nice perspective correction

(gl:hint :perspective-correction-hint :nicest)

)

(defmethod glut:display ((win my-window))

(gl:clear :color-buffer-bit :depth-buffer-bit)

(gl:load-identity))

(defmethod glut:reshape ((win my-window) width height)

(gl:viewport 0 0 width height) ; reset the current viewport

(gl:matrix-mode :projection) ; select the projection matrix

(gl:load-identity) ; reset the matrix

;; set perspective based on window aspect ratio

(glu:perspective 45 (/ width (max height 1)) 1/10 100)

(gl:matrix-mode :modelview) ; select the modelview matrix

(gl:load-identity) ; reset the matrix

)

(glut:display-window (make-instance 'my-window))

我得到以下错误:

READ error during COMPILE-FILE:

Package GLUT does not exist.

即使CL-glut.asd中存在的/ usr /共享/共口齿不清/系统。

我在做什么错?

+0

的可能重复的[无法从泥运行时查找包,而是从命令行是OK](http://stackoverflow.com/questions/15029420/not-able-to-find-package-when-running -from-粘液 - 丁从-命令行-是-OK) –

2013-04-22 21:31:16

 类似资料: