试图在Windows下安装Image.Codec.DevIL。需要pthread和IL。无法让IL工作

时间:2011-02-14 10:30:55

标签: haskell cabal

这是cabal install codec-image-devil的输出:

Resolving dependencies...  
Configuring Codec-Image-DevIL-0.2.3...  
cabal: Missing dependency on a foreign library:  
* Missing C library: IL  
This problem can usually be solved by installing the system package that  
provides this library (you may need the "-dev" version). If the library is  
already installed but in a non-standard location then you can use the flags  
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.  
cabal: Error: some packages failed to install:  
Codec-Image-DevIL-0.2.3 failed during the configure step. The exception was:  
ExitFailure 1  

我尝试了--extra-include-dirs--extra-lib-dirs。但他们没有工作。所以我在Codec-Image-DevIL-0.2.3.tar.gz编辑了.cabal。我不知道我是否应该改变它。但它适用于pthread

我添加了这两行:

include-dirs: C:\Users\Rumbold\Documents\libs\IL\include, C:\Users\Rumbold\Documents\libs\pthread\include, .  
extra-lib-dirs: C:\Users\Rumbold\Documents\libs\IL\lib, C:\Users\Rumbold\Documents\libs\pthread\lib, .  

它们缩进,因此它们位于Library部分。我不知道我是否有正确的列表格式,只是我在谷歌搜索时偶然发现的东西。我认为lib和`头文件都在正确的位置。

任何线索如何让它发挥作用?

Edit_1:

我让它与--extra-include-dirs--extra-lib-dirs一起使用,因此我不再需要编辑阴谋集。但是IL仍然不起作用。有没有办法找出它正在寻找的文件?

Wdit_2:

好吧它有效。我必须将DevIL.libDevIL.dll重命名为libIL.liblibIL.dll。 (不确定我是否必须同时做这两件事,但这就是我所做的。也保留了他们的旧名称)

Edit_3:

收到很多错误,如:

"cabal\Codec-Image-DevIL-0.2.3\ghc-6.12.3/libHSCodec-Image-DevIL-0.2.3.a(DevIL.o):fake:(.text+0x2379):
undefined reference to `ilGetInteger@4'"

0 个答案:

没有答案