我终于在Windows上安装了Haskell SDL bindings。使用这个:Haskell SDL:找不到mingw32.dll
> $env:Path += ";C:\SDL;C:\SDL\bin;C:\SDL\include;C:\SDL\lib"
> cabal install SDL --extra-include-dirs="C:\SDL\include" --extra-lib-dirs="C:\SDL\lib"
只要为配置脚本安装了Cygwin,就可以工作。不过,我写了一个小小的测试脚本:
import Graphics.UI.SDL as SDL
import Control.Monad (void)
import Control.Exception (bracket_)
main = bracket_ (SDL.init [InitEverything]) quit $ do
screen <- setVideoMode 800 600 0 []
SDL.flip screen
void $ waitEvent
尝试这个现在给了我此错误消息:
*Main> :main
Loading package SDL-0.6.4 ... <interactive>: mingw32: Cannot find specified module.
can't load .so/.DLL for: mingw32.dll (addDLL: could not load DLL)
现在,我一直在寻找mingw32.dll
,但我找不到它在我的电脑上,尽管我已经安装了MinGW32。有没有人在这里有过任何经验?使用SDL-0.6.4
,GHC 7.4.2
,从Haskell Platform 2012.4.0.0
。 Windows 7 64位。
ADDITION:我现在也尝试过A Haskell Adventure In Windows的推荐方式,而且结果也是一样的。
但是我的系统上没有任何'mingw32.dll'。谷歌搜索没有带来任何结果。我不认为一个'mingw32.dll'存在。 – Lanbo
@LambdaDusk,你是否安装了mingw,msys或msysgit?如果是的话,他们可能会干扰你的cygwin的构建设置 – sinelaw
@LambdaDusk实际上现在我只注意到你正在使用的指令是基于sdl dev libs的mingw构建的。你应该删除cygwin并安装mingw,或者删除基于mingw的sdl并安装一个cygwin,或者自己构建它(http://www.libsdl.org/extras/win32/cygwin/README.txt) – sinelaw