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. The "file" command should tell you whether the library is dynamic or static. But in general a static lib will have a ".a" extension and dynamic libs will have a ".so" or ".dylib" extension. "In general" because this is platform dependent and you could be working on a platform with different conventions.
On Mon, Jan 21, 2019 at 7:50 AM snmed <sandro.p.da...@gmail.com> wrote: > 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 failed: exit status 1 > > /usr/bin/ld: cannot find -lformw > > /usr/bin/ld: cannot find -lmenuw > > /usr/bin/ld: cannot find -lncursesw > > /usr/bin/ld: cannot find -lpanelw > > collect2: error: ld returned 1 exit status > > > > I have verified that all necessary libs are under /lib64, but the linker > still complains. I'd appreciate any clues on this topic. > > Cheers, > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- 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. For more options, visit https://groups.google.com/d/optout.