我正在尝试使用 go build
构建链代码。
环境:
- 安装 go 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。
有人可以帮忙吗?
最佳答案
在 Windows 上,您可以在没有 PKCS
的情况下构建
go build --tags nopkcs11
关于c++ - 无法在 Windows 上编译结构 - 缺少 ltdl.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45563414/