Reputation: 3445
I am trying to build a chaincode using go build
.
Environment:
When I run go build
I get the following error:
# 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.
I checked and my GCC installation does not contain the ltdl.h file in the include folder.
I found a SO post with a solution for Linux, but not one for Windows.
Can someone help?
Upvotes: 3
Views: 1085
Reputation: 1006
Try running the following command
sudo apt install libtool libltdl-dev
Make sure go get -u github.com/hyperledger/fabric/core/chaincode/shim
throws no error then go build
it.
Upvotes: 0