Thank you 
It did work . 

Build go code as a static  c  lib ,    and go code also link another c lib.

在 2017年4月19日星期三 UTC+8上午9:04:37,Ian Lance Taylor写道:
>
> On Tue, Apr 18, 2017 at 6:01 PM, hui zhang <fastf...@gmail.com 
> <javascript:>> wrote: 
> > 
> > C functions have to be available when the Go package is built. 
> > yes,  but  static lib is kind of definition. 
> > 
> > //#cgo CFLAGS: -I <include_path> 
> > //#cgo CXXFLAGS="${CFLAGS}" 
> > //#cgo LDFLAGS: -L <lib_path> -l<lib> 
> > 
> > will this above work ? if I want to build a go static lib? 
>
> I'm not sure exactly what you are asking, but, in general, sure, you 
> can link against a static library as you are doing here. 
>
> 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.

Reply via email to