fabric hello world by mac

0、参考https://www.ibm.com/developerworks/cn/cloud/library/cl-ibm-blockchain-chaincode-development-using-golang/index.html1、先写一个hello.go文件位于cd $GOPATH/src即 /Users/frank/go/src/hello.gofabric资源在$GOPATH/src/github.com/hyperledger

import "fmt"
import "github.com/hyperledger/fabric/core/chaincode/shim"


func main() {


	fmt.Println("hello world . 你好 世界!")


}
这里遇到import shime文件报错go build github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11: invalid flag in #cgo LDFLAGS: -I/usr/local/share/libtool

解决办法:https://stackoverflow.com/questions/49062730/invalid-flag-cgo-ldflags-break-build-with-go-lang

remove '/usr/local/share/libtool' from github.com/miekg/pkcs11 HEAD and then build successfully.
找到pkcs11.go文件,打开后搜索'/usr/local/share/libtool',发现有两行注释中包含,删除后可以编辑通过!  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值