On Fri, May 10, 2019 at 10:56 AM <raje.andr...@gmail.com> wrote:
>
> I have certain utility package which can be used by multiple projects.
> Now in place of copying complete utility code in all of these projects at 
> time of building that project, I need to use archive file <utility.a>.
>
> So, I generated <utility.a> and it is placed in $GOPATH/pkg/linux_amd64   
> [Note $GOROOT and $GOPATH are not same for my environment]. Source code for 
> utility package is not present in $GOPATH or $GOROOT.
>
> Now I am trying to build a project in $GOPATH, but it is unable to find 
> package present in <utility.a>
>
> Please help where I am missing.

Building with the go tool requires the source code of each package, so
that the go tool can determine what other packages are imported.  Also
the exact import path matters.  You can't work around this by just
copying around the .a file.  Copy the source.

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/CAOyqgcWEB_L32-gBz7_b5XjqhB2Ak%3DdGUaNiESqF4LatO3S-5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to