如何在Windows上安装zeromq4-haskell? (无法找到zmq依赖关系)

时间:2016-05-07 17:36:32

标签: windows haskell zeromq

我从windows二进制文件http://zeromq.org/distro:microsoft-windows安装了zmq,然后运行:

cabal install zeromq4-haskell --extra-include-dirs="F:\thirdparty\ZeroMQ4.0.4\include\" --extra-lib-dirs="F:\thirdparty\ZeroMQ4.0.4\lib\"

但我仍然缺少zmq依赖:

Resolving dependencies...
Configuring zeromq4-haskell-0.6.4...
Failed to install zeromq4-haskell-0.6.4
Build log ( C:\Users\calin\AppData\Roaming\cabal\logs\zeromq4-haskell-0.6.4.log ):
Configuring zeromq4-haskell-0.6.4...
setup-Simple-Cabal-1.22.5.0-x86_64-windows-ghc-7.10.3.exe: Missing dependency
on a foreign library:
* Missing C library: zmq
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:
zeromq4-haskell-0.6.4 failed during the configure step. The exception was:
ExitFailure 1

我也尝试过这个页面,但我无法到达http://gettingsharper.de/2015/06/23/bridging-the-worlds-with-omq/。我没有得到/ bin或/ lib的意思。

cabal --version
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library

ghci --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

我需要这个来安装ihaskell。帮助

1 个答案:

答案 0 :(得分:5)

似乎我设法解决了它:

  1. <ZMQ>\lib\libzmq-v120-mt-4_0_4.lib复制到<ZMQ>\lib\zmq.lib
  2. <ZMQ>\bin\libzmq-v120-mt-4_0_4.dll复制到System32\zmq.dll
  3. 运行:
  4. cabal install zeromq4-haskell --extra-include-dirs=<ZMQ>\include --extra-lib-dirs=<ZMQ>\lib