【发布时间】:2016-04-23 03:03:35
【问题描述】:
有人在 Mac OS X 上开发常见的 lisp 游戏吗?最近想在Mac OS X上搭建一个lisp游戏开发,但是卡住了。
Operating System version:
ProductName: Mac OS X
ProductVersion: 10.11.4
BuildVersion: 15E65
sbcl version:
SBCL 1.3.3
我找到 Github 存储库页面:https://github.com/lispbuilder/lispbuilder/wiki/DownloadInstallation 并按照 OS X 安装部分进行操作。我尝试安装 SDL 1.2 的运行时库和运行时二进制文件以及 SDL 2.0 的开发库。它的行为如下:
当我运行一些在使用 lispbuilder-sdl 的 Linux 上运行良好的简单代码时:
(defun draw-a-box-in-window ()
(sdl:with-init
()
(let ((width 500)
(height 500))
(sdl:window width height)
(setf (sdl:frame-rate) 60)
(sdl:clear-display
(sdl:color
:r 127
:g 127
:b 127))
(sdl:draw-box
(sdl:rectangle
:x (floor (/ width 3))
:y (floor (/ height 3))
:w (floor (/ height 3))
:h (floor (/ height 3)))
:color (sdl:color
:r 200
:g 200
:b 200))
(sdl:update-display)
(sdl:with-events
()
(:quit-event () t)
(:key-down-event ()
(when (sdl:key-down-p :sdl-key-q)
(sdl:push-quit-event)))))))
(draw-a-box-in-window)
发生了一些错误:
arithmetic error FLOATING-POINT-INEXACT signalled
[Condition of type FLOATING-POINT-INEXACT]
Restarts:
0: [RETRY] Retry SLIME evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD "worker" RUNNING {1005D039E3}>)
Backtrace:
0: ("bogus stack frame")
1: ("foreign function: -[NSPlaceholderNumber initWithDouble:]")
2: ("foreign function: +[CALayer defaultValueForKey:]")
有人知道怎么解决吗?谢谢。
【问题讨论】:
标签: macos sdl common-lisp sdl-2