summaryrefslogtreecommitdiff
path: root/Build_bundled_static.go
diff options
context:
space:
mode:
authorVladimir Buzuev <[email protected]>2021-04-03 18:45:09 -0700
committerGitHub <[email protected]>2021-04-03 18:45:09 -0700
commit0d7c8dadb465a0236d0f130a0cfd5179502f191d (patch)
treebc395ebc158ebf03c10b17162695b372466a577c /Build_bundled_static.go
parenta4d202ed7b025331ee4a63ebc38f62519cee4750 (diff)
fix buldled static build on Windows/MinGW (#761)
seems like need more libraries in LDFLAGS: * ws2_32 for socket, connect, htonl, etc * ole32 for CoInitializeEx * rpcrt4 for UuidCreate * crypt32 for CertFreeCertificateContext
Diffstat (limited to 'Build_bundled_static.go')
-rw-r--r--Build_bundled_static.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/Build_bundled_static.go b/Build_bundled_static.go
index 4d10d45..65e31ac 100644
--- a/Build_bundled_static.go
+++ b/Build_bundled_static.go
@@ -4,7 +4,7 @@ package git
/*
#cgo windows CFLAGS: -I${SRCDIR}/static-build/install/include/
-#cgo windows LDFLAGS: -L${SRCDIR}/static-build/install/lib/ -lgit2 -lwinhttp
+#cgo windows LDFLAGS: -L${SRCDIR}/static-build/install/lib/ -lgit2 -lwinhttp -lws2_32 -lole32 -lrpcrt4 -lcrypt32
#cgo !windows pkg-config: --static ${SRCDIR}/static-build/install/lib/pkgconfig/libgit2.pc
#cgo CFLAGS: -DLIBGIT2_STATIC
#include <git2.h>