我正在使用Windows10。当我尝试构建Chaincode时,它报告了此错误。
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
exec: "gcc": executable file not found in %PATH%
我的chaincode导入:
import (
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)
它在Docker中运行良好。
gcc(GNU编译器集合)提供了C编译器。在Windows上,安装TDM-GCC。该github.com/miekg/pkcs11
软件包使用cgo。Cgo支持创建调用C代码的Go包。
tq工作正常,但现在得到了不同的错误
.\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory compilation terminated.
我安装了libtools,但无法正常工作
jaswanth,查看@Ashinkel给出的答案。我确实有同样的问题,但这对我有用。
下载用于Windows的TDM-GCC安装程序时,请使用x64版本。32位版本没有为我解决问题。
TDM-GCC [ jmeubank.github.io/tdm-gcc/]的安装对我来说很好用Windows 10测试带有fyne的执行[ fyne.io]