2

これは 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ました。しかし、それらは機能しませんでした。で.cabalを編集しましたCodec-Image-DevIL-0.2.3.tar.gz。それを変更する必要があるかどうかさえわかりません。しかし、それはうまくいきましたpthread

次の 2 行を追加しました。

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セクションにあるようにインデントされています。リストのフォーマットが正しいかどうかはわかりません。グーグルで見つけたものです。libs と `header ファイルはすべて正しい場所にあると思います。

どうすればそれを機能させることができますか?

編集_1:

--extra-include-dirsとで動作する--extra-lib-dirsようになったので、cabal を編集する必要はもうありません。しかし、ILはまだ機能しません。探しているファイルを見つける方法はありますか?

Wdit_2:

それはうまくいきます。DevIL.lib名前を andDevIL.dllからlibIL.libandに変更する必要がありlibIL.dllました。(両方をしなければならなかったかどうかはわかりませんが、それが私がしたことです。また、それらを古い名前のままにしました)

編集_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'"
4

0 に答える 0