Go Language Static Linking to remove libstdc++ Requirement
Question:
I used compiler from here for windows: http://mingw-w64.org/doku.php
I built the application I described earlier. Looks like I have to supply
libstdc++.dll along with the exe. Is it possible to build everything statically ?
Answer:
Yes, see here: https://blog.madewithdrew.com/post/statically-linking-c-to-go/
Specifically:
$ go build --ldflags '-extldflags "-static"' file.go
admin
0
Tags :