On Sat, Oct 29, 2016 at 10:22 AM, <pat.sri...@gmail.com> wrote: > Can you please provide more info? If i use the below command to compile my > project, the linker error still pops up. > > Just to recap, > > My packages A and B statically link a common library LIBA. Also, Package B > imports A. Compilation of the individual packages is successful but when i > try to create a binary (using package main which imports B) I get a linker > error for redefinition of the library. > > > I understand that Im linking the library twice (once in package A and once > in B) but I cant compile the individual packages without linking it in each > of the packages. > > > package A: > > package A > /* > #cgo LDFLAGS: -Bstatic ${SRCDIR}/../lib/libeventbridge.a > */ > import "C" > > > The same thing in package B: > > package B > > import "A" > /* > #cgo LDFLAGS: -Bstatic ${SRCDIR}/../lib/libeventbridge.a > */ > import "C"
Please open an issue at https://golang.org/issue with a complete standalone reproduction case. I'm not really sure what is going on. 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.