Trying to install Image.Codec.DevIL under windows. Needs pthread and IL. Can't get IL to work

橙三吉。 提交于 2020-01-05 02:51:07

问题


This is the output from 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  

I tried --extra-include-dirs and --extra-lib-dirs. but they didn't work. so I edited the .cabal in Codec-Image-DevIL-0.2.3.tar.gz. I don't know if I'm even supposed to change that. but it worked for pthread.

I added these two lines:

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, .  

They are indented so they are in the Library section. I don't know if I got the format for lists right, just something i stumbled upon while googling. The libs and `header files are all in the correct place, I think.

any clue how i can get it to work?

Edit_1:

I got it to work with --extra-include-dirs and --extra-lib-dirs, so I don't need to edit the cabal anymore. but IL still doesn't work. is there a way to find out which files it's looking for?

Wdit_2:

Alright it works. I had to rename DevIL.lib and DevIL.dll to libIL.lib and libIL.dll. (not sure if I had to do both, but that's what I did. also kept them under their old names)

Edit_3:

Getting lots of errors like:

"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'"

来源:https://stackoverflow.com/questions/4991093/trying-to-install-image-codec-devil-under-windows-needs-pthread-and-il-cant-g

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!