我正在尝试安装Haskell的SDL-image library,这是与原始C库同名的一组绑定。我已经构建并安装了SDL库及其相应的Haskell包,并将SDL-image库中的文件放到了安装SDL的目录中。现在,当我尝试安装SDL-image绑定时,我得到以下错误:
$ 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一些粗略的谷歌搜索告诉我,我应该告诉configure在哪里可以找到lib文件,但我不确定如何去做。我试过使用gcc标志的-ldirectory,但得到了同样的结果。
我在Win7x64上使用MinGW。提前感谢所有的帮助,如果我没有包含足够的信息,我很抱歉,我不确定什么是重要的,因为我不是很好地理解这个问题。
发布于 2012-12-05 20:24:52
我对SDL_image不太确定,但我已经成功地为Haskell构建了它。没有必要去编辑密谋文件。
假设您已经安装了Haskell平台,安装了MINGW和MSYS,并且在某个地方安装了MINGW版本的SDL,您只需要设置C_INCLUDE_PATH和LIBRARY_PATH环境变量来指向SDL的头文件和库。
完成此操作后,您可以使用MINGW shell来运行cabal install SDL。
https://stackoverflow.com/questions/13719458
复制相似问题