fix buldled static build on Windows/MinGW (#761) (#763)

seems like need more libraries in LDFLAGS:

* ws2_32 for socket, connect, htonl, etc
* ole32 for CoInitializeEx
* rpcrt4 for UuidCreate
* crypt32 for CertFreeCertificateContext

(cherry picked from commit 0d7c8dadb4)

Co-authored-by: Vladimir Buzuev <44682889+vladimir-buzuev@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2021-04-04 08:28:49 -07:00 committed by GitHub
parent bcfd445806
commit efed131f1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ package git
/* /*
#cgo windows CFLAGS: -I${SRCDIR}/static-build/install/include/ #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 !windows pkg-config: --static ${SRCDIR}/static-build/install/lib/pkgconfig/libgit2.pc
#cgo CFLAGS: -DLIBGIT2_STATIC #cgo CFLAGS: -DLIBGIT2_STATIC
#include <git2.h> #include <git2.h>