无法在Windows上编译结构 - 缺少ltdl.h

时间:2017-08-08 08:39:35

标签: c++ hyperledger-fabric libtool

我正在尝试使用go build构建链代码。

环境:

  • 安装了1.8.3 windows / amd
  • Windows 10

当我运行go build时,我收到以下错误:

# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
..\..\github.com\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory
compilation terminated.

我检查过,我的GCC安装中不包含 include 文件夹中的 ltdl.h 文件。

我发现了一个带有solution for Linux的SO帖子,但没有一个用于Windows。

有人可以帮忙吗?

2 个答案:

答案 0 :(得分:4)

在Windows上,您可以在不使用PKCS

的情况下进行构建

go build --tags nopkcs11

答案 1 :(得分:0)

尝试运行以下命令

sudo apt install libtool libltdl-dev

确保go get -u github.com/hyperledger/fabric/core/chaincode/shim不会引发任何错误,然后go build