[Haskell-cafe] SDL build problem

Henk-Jan van Tuyl hjgtuyl at chello.nl
Sun Oct 11 17:10:02 EDT 2009


L.S.,

I am trying to install SDL, but I get error messages about multiple  
definition of `main'; before I spend many hours of debugging, does anybody  
know why this happens? See the log below.

Regards,
Henk-Jan van Tuyl


C:\Programs\Haskell\Libs\SDL-0.5.5>runhaskell Setup configure  
--extra-include-dirs=C:\Programs\MSYS\1.0\include\SDL

Setup.lhs:2:2:
     Warning: In the use of `defaultUserHooks'
              (imported from Distribution.Simple):
              Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless  
you need Cabal-1.2
              compatibility in which case you must stick with  
defaultUserHooks"
Warning: defaultUserHooks in Setup script is deprecated.
Configuring SDL-0.5.5...
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
config.status: includes/HsSDLConfig.h is unchanged

C:\Programs\Haskell\Libs\SDL-0.5.5>runhaskell Setup build

Setup.lhs:2:2:
     Warning: In the use of `defaultUserHooks'
              (imported from Distribution.Simple):
              Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless  
you need Cabal-1.2
              compatibility in which case you must stick with  
defaultUserHooks"
Preprocessing library SDL-0.5.5...
dist\build\Graphics\UI\SDL\General_hsc_make.o:General_hsc_make.c:(.text+0x0):  
multiple definition of `main'
C:\Programs\ghc\ghc-6.10.4/gcc-lib/libmingw32.a(main.o):main.c:(.text+0x0):  
first defined here
C:/Programs/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:246:  
undefined reference to `SDL_main'
collect2: ld returned 1 exit status
linking dist\build\Graphics\UI\SDL\General_hsc_make.o failed
command was: C:\Programs\ghc\ghc-6.10.4\gcc.exe  
-BC:\Programs\ghc\ghc-6.10.4\gcc-lib  
-IC:\Programs\ghc\ghc-6.10.4\include\mingw -lSDL -L/usr/lib -lmingw32  
-lSDLmain -lSDL -mwindows -LC:\Programs\ghc\ghc-6.10.4\base-4.1.0.0  
-lwsock32 -luser32 -lshell32 -LC:\Programs\ghc\ghc-6.10.4\integer-0.1.0.1  
-LC
:\Programs\ghc\ghc-6.10.4\ghc-prim-0.1.0.0 -LC:\Programs\ghc\ghc-6.10.4  
-LC:\Programs\ghc\ghc-6.10.4/gcc-lib -lm -lffi -lgmp -lwsock32  
dist\build\Graphics\UI\SDL\General_hsc_make.o -o  
dist\build\Graphics\UI\SDL\General_hsc_make.exe



-- 



More information about the Haskell-Cafe mailing list