Thanks for the reply. 
Is there any automatic way to build a dynamic library that cgo-package 
depends on? 

I have the following line in sources of my cgo package(I have the dynamic 
library *libcl3go.so* in *cwrap* folder):
// #cgo LDFLAGS: -Lcwrap/ -lcl3go

When I use `go get <my cgo package>` or `go build <external package that 
uses the cgo package>` I have got some gotools errors referring the fact 
that cgo package is downloaded but not built because of `make` hasn't been 
run and the dynamic library hasn't appeared in *cwrap* folder. 
Maybe there is no point of using separate cgo packages depending on dynamic 
libraries and I should just include it inside my main package with fully 
controlled build mechanisms?

понеділок, 6 травня 2019 р. 23:44:09 UTC+3 користувач Ian Lance Taylor 
написав:
>
> On Mon, May 6, 2019 at 12:37 PM <grubia...@gmail.com> wrote: 
> > 
> > Hello, 
> > I am trying to adopt my cgo package with go modules. 
> > The cgo project I mentioned above is built using simple Makefile so that 
> I obtain external shared library(.so on Unixes and .dll on Windows) to link 
> external applications(from other modules) with. 
> > When I try to use this module from the other go module the cgo module 
> will be downloaded but failed to build because Makefile won't be run. Is 
> there a way to call Makefile during the automatic build of downloaded cgo 
> package using `go get` or `go build` from an external module that depends 
> on my cgo package? 
>
> We've intentionally steered clear of having `go get` or `go build` 
> invoke `make`.  Running `make` can literally do anything on your 
> system.  We don't want that to happen as a side-effect of running the 
> go tool.  At least for now it has to be an explicit decision by the 
> user.   In your case you'll have to document the requirement. 
>
> 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/bd9235a6-5051-4cc9-a4a7-2f7d84f125d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to