Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL_image won't install

I'm trying to install the SDL-image library for Haskell, a set of bindings for the original C library of the same name. I've already built and installed the SDL library and its corresponding Haskell package, and dropped the files from the SDL-image library into the directory where SDL was installed. Now when I try to install the SDL-image bindings I get the following error:

$ runghc Setup.lhs configure
Configuring SDL-image-0.6.1...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for sdl-config... /usr/bin/sdl-config
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... .o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for IMG_Load in -lSDL_image... no
configure: error: *** SDL_image lib not found! Get SDL_image from http://www.libdsl.org/projects/SDL_image/index.html

Some cursory googling told me I should be telling configure exactly where to find the lib file, but I'm not sure how to go about doing this. I've tried using the gcc flag -l[directory], but got the same result.

I'm using MinGW on Win7x64. Thanks in advance for any help, and apologies if I haven't included enough information, I'm not sure what's important because I don't understand the problem very well.

like image 688
Einar Avatar asked Nov 13 '22 16:11

Einar


1 Answers

I'm not sure about SDL_image, but I've successfully built SDL for Haskell. There's no need to go editing the cabal files.

Assuming you have the Haskell Platform, MINGW and MSYS installed, and the MINGW version of SDL somewhere, you just need to set the C_INCLUDE_PATH and LIBRARY_PATH environment variables to point to the headers and libs of SDL.

Once you've done that, you can use a MINGW shell to run cabal install SDL.

like image 184
stusmith Avatar answered Nov 15 '22 10:11

stusmith