3 ms·
He leaves out discussion of a crucial part of app distribution: dynamic libraries. While you can't create and link with dynamic libraries in Go, you can call i
by delinka 13y ago
He leaves out discussion of a crucial part of app distribution: dynamic libraries.
While you can't create and link with dynamic libraries in Go, you can call into C or C++ libraries. Go binaries are self-contained as long as all your code is Go. But if you're depending on a C or C++ library, you still have to worry about this aspect of distribution.
- rwcarlsen 13y agoIt is now possible to statically compile+link C libraries into your Go binary. The sqlite3 package (http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3 http://godoc.org/code.google.com/p/go-sqlite/go1/sqlite3) is a good example of this.
- archgoon 13y agoAnother aspect is that some opensource licensing schemes may require you to link dynamically. The LGPL, for example, requires you to do this unless you release the rest of your source code.
- octo_t 13y agoI'd have thought you could just statically link with the C and C++ libraries, creating a static binary? edit: beaten by rwcarlsen