Skip to content

Commit 0d7c8da

Browse files
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
1 parent a4d202e commit 0d7c8da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Build_bundled_static.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package git
44

55
/*
66
#cgo windows CFLAGS: -I${SRCDIR}/static-build/install/include/
7-
#cgo windows LDFLAGS: -L${SRCDIR}/static-build/install/lib/ -lgit2 -lwinhttp
7+
#cgo windows LDFLAGS: -L${SRCDIR}/static-build/install/lib/ -lgit2 -lwinhttp -lws2_32 -lole32 -lrpcrt4 -lcrypt32
88
#cgo !windows pkg-config: --static ${SRCDIR}/static-build/install/lib/pkgconfig/libgit2.pc
99
#cgo CFLAGS: -DLIBGIT2_STATIC
1010
#include <git2.h>

0 commit comments

Comments
 (0)