Haskell:无法在Windows上安装SDL-0.6.2

我试图在Windows 7上安装Haskell SDL-0.6.2软件包,使用ghc 6.12.1(Haskell平台)。 我最终从cabal获得以下输出:

C:\Users\Martin\dev\Rasenschach_0>cabal install SDL Resolving dependencies... [1 of 1] Compiling Main ( C:\Users\FAMILI~1\AppData\Local\Temp\SDL-0 .6.25076\SDL-0.6.2\Setup.lhs, C:\Users\FAMILI~1\AppData\Local\Temp\SDL-0.6.25076 \SDL-0.6.2\dist\setup\Main.o ) C:\Users\FAMILI~1\AppData\Local\Temp\SDL-0.6.25076\SDL-0.6.2\Setup.lhs:2:2: Warning: In the use of `defaultUserHooks' (imported from Distribution.Simple): Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you n eed Cabal-1.2 compatibility in which case you must stick with defaultUserHooks" Linking C:\Users\FAMILI~1\AppData\Local\Temp\SDL-0.6.25076\SDL-0.6.2\dist\setup\ setup.exe ... Warning: defaultUserHooks in Setup script is deprecated. Configuring SDL-0.6.2... configure: WARNING: unrecognized options: --with-hc checking for sdl-config... /usr/bin/sdl-config configure: creating ./config.status config.status: creating config.mk config.status: creating SDL.buildinfo config.status: creating includes/HsSDLConfig.h configure: WARNING: unrecognized options: --with-hc Preprocessing library SDL-0.6.2... dist\build\Graphics\UI\SDL\General_hsc_make.o:General_hsc_make.c:(.text+0x0): mu ltiple definition of `main' /MinGW/lib/libmingw32.a(main.o):main.c:(.text+0x0): first defined here /MinGW/lib/libSDLmain.a(SDL_win32_main.o): In function `console_main': /Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:315: undefined r eference to `SDL_main' collect2: ld returned 1 exit status linking dist\build\Graphics\UI\SDL\General_hsc_make.o failed command was: C:\Program Files\Haskell Platform\2010.1.0.0\mingw\bin\gcc.exe -lSD L -L/MinGW/lib -lmingw32 -lSDLmain -lSDL -mwindows -LC:\Program Files\Haskell Pl atform\2010.1.0.0\base-4.2.0.0 -lwsock32 -luser32 -lshell32 -LC:\Program Files\H askell Platform\2010.1.0.0\integer-gmp-0.2.0.0 -LC:\Program Files\Haskell Platfo rm\2010.1.0.0\ghc-prim-0.2.0.0 -LC:\Program Files\Haskell Platform\2010.1.0.0 -L C:\Program Files\Haskell Platform\2010.1.0.0/gcc-lib -lm -lwsock32 -LC:\Program Files\Haskell Platform\2010.1.0.0 dist\build\Graphics\UI\SDL\General_hsc_make.o -o dist\build\Graphics\UI\SDL\General_hsc_make.exe cabal: Error: some packages failed to install: SDL-0.6.2 failed during the building phase. The exception was: ExitFailure 1 

libSDL似乎在我的机器上正确安装,至less我可以得到一个示例C程序使用MinGW和gcc运行。

有没有人遇到同样的问题? 我在这里find了一个链接,但提出的解决scheme(对hsc2hs的小改动)似乎并不适用于我。 任何帮助,将不胜感激!

编辑:所以我终于得到它运行,虽然我不知道究竟如何…图我必须运行“cabal安装”内bash和小提琴与sdlconfiguration(删除“-lmingw32 -lSDLmain -lSDL.dll -mwindows“从它的”–lib“标签)。 但是我怀疑我可以在第二次尝试时重现我的结果。

Solutions Collecting From Web of "Haskell:无法在Windows上安装SDL-0.6.2"