patterngoCritical
exec: "gcc": executable file not found in %PATH% when trying go build
Viewed 0 times
gccfoundbuildfileexecutablenotpathwhenexectrying
Problem
I am using Windows 10. When I tried to build Chaincode it reported this error
My chaincode imports:
It's running fine in Docker.
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
exec: "gcc": executable file not found in %PATH%My chaincode imports:
import (
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
)It's running fine in Docker.
Solution
gcc (the GNU Compiler Collection) provides a C compiler. On Windows, install TDM-GCC. The
github.com/miekg/pkcs11 package uses cgo. Cgo enables the creation of Go packages that call C code.Context
Stack Overflow Q#43580131, score: 153
Revisions (0)
No revisions yet.