2011-11-03 38 views
5

Sto cercando di installare il pacchetto Haskell SDL-0.6.2 su Windows 7 con ghc 6.12.1 (piattaforma Haskell). Io alla fine ottenendo il seguente output di cabala:Haskell: Impossibile installare SDL-0.6.2 su Windows

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 sembra essere installato correttamente sulla mia macchina, almeno posso avere un programma di esempio C per eseguire usando MinGW e gcc.

Qualcuno ha incontrato lo stesso problema? Ho trovato un collegamento here ma la soluzione proposta (modifica minore di hsc2hs) non sembra applicarsi a me. Qualsiasi aiuto sarebbe apprezzato!

EDIT: Così ho finalmente capito a correre, anche se non so esattamente come ... Figured devo correre "cabala install" all'interno di un bash e tergiversate sdl-config (rimosso "-lmingw32 -lSDLmain -lSDL.dll -mwindows "dal suo" --lib "tag). Ma dubito che avrei potuto riprodurre il mio risultato quando si cerca una seconda volta ...

+0

ci sono le istruzioni nel file Win32 in distribuzione sorgente del pacchetto di SDL che mi ha aiutato compilo ed eseguilo su Win7/mingw. –

+0

@fs: Grazie, non l'ho visto! Lo proverò! – martingw

+0

@fs: Ho provato (ho cambiato la linea extra-librerie in Cabal-Files), ma ho ancora lo stesso errore. – martingw

risposta