Cabal:缺少对外国C库的依赖

时间:2017-08-22 06:03:56

标签: haskell cabal

我一直在尝试在我的Windows机器上安装tensorflow / haskell软件包。

但是,在使用stack和cabal安装时,我一直遇到这个错误:

Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe: Missing dependency on a foreign
    library:
    * Missing C library: tensorflow
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.

根据Tensorflow网站:https://www.tensorflow.org/install/install_c ,Tensorflow的C包只能在Unix机器上运行。我不确定这是不是死路一条,还是有一些解决方法。

我对链接图书馆或与cabal没有经验,并希望得到一些帮助。

使用Cabal,我在目录中包含了以下.cabal文件:

cabal-version: >= 1.2 
Executable hax 
Includes: c_api.h 
Extra-libraries: tensorflow 

但我仍然收到错误:cabal.exe: Missing dependency on a foreign library: * Missing C library: tensorflow The exception was: user error (Using 'build-type: Custom' but there is no Setup.hs or Setup.lhs script.)

1 个答案:

答案 0 :(得分:0)

你写"根据Tensorflow网站:https://www.tensorflow.org/install/install_c,Tensorflow的C包只能在Unix机器上运行。我不确定这是不是死路一条,还是有一些解决方法。"

事实上,如果您没有在您的计算机上安装tensorflow C软件包 - 因为它不会在其上运行,那么您无法找到它来绑定到它

没有解决方法。