On Tue, Jul 18, 2017 at 9:40 PM, <bhaskar.sing...@gmail.com> wrote: > > I am trying to link a dynamic library to my go code. > > /* > #cgo CFLAGS: -I/usr/local/include > #cgo LDFLAGS: -L/usr/local/lib -ltemp > #include <stdio.h> > #include <stdlib.h> > #include <libtemp.h> > */ > > When I run go build -x it fails due to missing symbols which are exported > from libtemp.so but if do > go build -x -gccgoflags '-L/usr/local/lib -ltemp' then it works fine. > > I am wondering if there is a way to specify -gccgoflags using pseudo #cgo > directive.
The ordinary #cgo LDFLAGS should work with gccgo as it does with the gc toolchain. Can you show us the output of `go build -x`? Also tell us which version of the toolchains 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. For more options, visit https://groups.google.com/d/optout.