Search code examples
c++hyperledger-fabriclibtool

Can't compile fabric on windows - missing ltdl.h


I am trying to build a chaincode using go build.

Environment:

  • installed go 1.8.3 windows/amd
  • Windows 10

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?


Solution

  • On windows you can build without PKCS

    go build --tags nopkcs11