Re: [go-nuts] Statically compile and link a go program with C dependencies

2019-01-21 Thread Justin Israel
On Tue, Jan 22, 2019, 8:27 AM snmed wrote: > Hi thanks, > > Ah yes, it seems that i forgot that with the static library. Now i've the > static library under ./libs folder and i use this command: > go build -ldflags '-L./libs -w -extldflags "-static"' -a > > but now i get this message: > flag prov

Re: [go-nuts] Statically compile and link a go program with C dependencies

2019-01-21 Thread snmed
Hi thanks, Ah yes, it seems that i forgot that with the static library. Now i've the static library under ./libs folder and i use this command: go build -ldflags '-L./libs -w -extldflags "-static"' -a but now i get this message: flag provided but not defined: -L./libs usage: link [options] main

Re: [go-nuts] Statically compile and link a go program with C dependencies

2019-01-21 Thread Kurtis Rader
You say you "verified that all necessary libs are under /lib64." Do you actually have static versions of those libraries or just dynamic versions? For example, on macOS I only have dynamic (ending in .dylib) versions so it isn't possible to statically link a binary that requires those libraries. Th

[go-nuts] Statically compile and link a go program with C dependencies

2019-01-21 Thread snmed
Hi all I try to compile and statically link the following example: https://github.com/rthornton128/goncurses/tree/master/examples/curs_menu I use this command: go build -ldflags '-w -extldflags "-static"' -a Unfortunately i get only this: /usr/lib/go/pkg/tool/linux_amd64/link: running gcc faile