无法在 Quicklisp 中加载 sdl-gfx

发布于 2024-11-24 01:40:27 字数 1146 浏览 2 评论 0原文

我一直在使用 Quicklisp 安装 lispbuilder-sdl 系列,并在 sdl-gfx 中遇到错误:

CL-USER> (ql:quickload "lispbuilder-sdl-gfx")
To load "lispbuilder-sdl-gfx":                                                  
  Load 1 ASDF system:                                                           
    lispbuilder-sdl-gfx                                                         
; Loading "lispbuilder-sdl-gfx"                                                 
...........;                                                                    
           ; compilation unit aborted                                           
           ;   caught 1 fatal ERROR condition  

Unable to load any of the alternatives:                                         
   ("libSDL_gfx.dylib" (:FRAMEWORK "SDL_gfx"))
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

我在 macosx 10.6 下使用 slime+emacs+SBCL。我已经通过此链接安装了 SDL.framework:

http://thirdcog.eu/apps/frameworks#glew< /a>

一个名为 sdl_with_friends.zip 的文件并将其放在 /Library/Frameworks 下。然而它仍然抱怨找不到框架。 对此有什么想法吗?

I've been installing lispbuilder-sdl family with quicklisp and encountered error in sdl-gfx:

CL-USER> (ql:quickload "lispbuilder-sdl-gfx")
To load "lispbuilder-sdl-gfx":                                                  
  Load 1 ASDF system:                                                           
    lispbuilder-sdl-gfx                                                         
; Loading "lispbuilder-sdl-gfx"                                                 
...........;                                                                    
           ; compilation unit aborted                                           
           ;   caught 1 fatal ERROR condition  

Unable to load any of the alternatives:                                         
   ("libSDL_gfx.dylib" (:FRAMEWORK "SDL_gfx"))
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

I use slime+emacs+SBCL under macosx 10.6. I've installed SDL.framework from this link:

http://thirdcog.eu/apps/frameworks#glew

a file called sdl_with_friends.zip and put things under /Library/Frameworks. However it still complains about cannot find framework.
Any idea on this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

煞人兵器 2024-12-01 01:40:27

在 Mac OSX 上安装 lispbuilder-sdl 最简单的方法是启动 SBCL 并使用 Quicklisp:

(ql:quickload "lispbuilder-sdl")

它可能会失败,但您可以编译位于“~quicklisp/dists/quicklisp/software/lispbuilder 中的 OS-X 特定帮助程序库-20110619-svn/lispbuilder-sdl/cocoahelper”;只需 cd 到此目录并输入“make”

即可验证是否有效,请尝试以下操作:

(ql:quickload "lispbuilder-sdl-examples")
(lispbuilder-sdl-examples:bezier)

另一个常见问题是当您使用 Emacs / SLIME 时。可可位必须在主线程上运行,因此您必须调用如下内容:

#+darwin #+sb-thread
(let ((thread (first (last (sb-thread:list-all-threads)))))
  (sb-thread:interrupt-thread thread #'(lambda () (ql:quickload "lispbuilder-sdl-examples")))
  (sb-thread:interrupt-thread thread #'(lambda () (lispbuilder-sdl-examples:bezier))))

The easiest way to install lispbuilder-sdl on Mac OSX is to fire up SBCL and use Quicklisp:

(ql:quickload "lispbuilder-sdl")

It will probably fail, but you can then compile the OS-X specific helper library located in "~quicklisp/dists/quicklisp/software/lispbuilder-20110619-svn/lispbuilder-sdl/cocoahelper"; just cd to this directory and type "make"

To verify that worked, try this:

(ql:quickload "lispbuilder-sdl-examples")
(lispbuilder-sdl-examples:bezier)

Another common gotcha is when you are using Emacs / SLIME. The cocoa bits must run on the primary thread, so you have to invoke things like this:

#+darwin #+sb-thread
(let ((thread (first (last (sb-thread:list-all-threads)))))
  (sb-thread:interrupt-thread thread #'(lambda () (ql:quickload "lispbuilder-sdl-examples")))
  (sb-thread:interrupt-thread thread #'(lambda () (lispbuilder-sdl-examples:bezier))))
夕色琉璃 2024-12-01 01:40:27

该错误抱怨它无法加载 SDL 的动态库。抱歉 - 我对 mac 上的目录布局了解不多(这似乎是你工作的地方),所以我无法确切地告诉你如何解决这个问题。但是您应该在某个地方安装了一个名为 libSDL_gfx.dylib (可能是这个扩展名)的文件,并且错误消息意味着 CFFI 无法找到它。

The error is complaining that it can't load the dynamic library for SDL. I'm sorry - I don't know much about the directory layout on macs (which appears to be where you're working), so I can't exactly tell you how to fix this. But somewhere you should have installed a file called libSDL_gfx.dylib (probably this extension) and the error message means that CFFI is failing to find it.

夏至、离别 2024-12-01 01:40:27

使用自制程序,您可以 brew install sdl_gfx

using homebrew you can brew install sdl_gfx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文