Actually, it depends on which std libs are used. https://www.arp242.net/static-go.html is a concise introduction. net and os/user normally prevent a static binary, unless build tags netgo and osusergo are used.
On Monday, September 26, 2022 at 4:37:00 PM UTC+2 Ian Lance Taylor wrote: > On Mon, Sep 26, 2022 at 7:22 AM Jessica Park > <outsider...@gmail.com> wrote: > > > > When java... > > can import .jar ... in this case, we call dynamic link.. > > > > How about golang? > > > > Is it dynamic linking or static linking? > > A pure Go program that does not use cgo will use static linking on > most operating systems. > > A mixed Go/C program that does use cgo will use dynamic linking on > most operating systems. > > > I need clear information. > > A more precise answer will require more details as to exactly what you > are doing and what operating system you are using. > > Ian > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4323a623-8bfe-459c-b662-392e89642fe6n%40googlegroups.com.