Thanks for confirming my suspicions. 

I have a follow-up question, how can I instrument my go code so that I can 
set the include path that is used to resolve '%include' statements in my 
swig code. Currently I have relative paths in my swig file, and I would 
like to put '/usr/include' on the search path for the swig compilation. Is 
this possible?

On Friday, October 14, 2016 at 2:33:23 PM UTC+1, Ian Lance Taylor wrote:
>
> On Fri, Oct 14, 2016 at 3:42 AM,  <andrew...@miracl.com <javascript:>> 
> wrote: 
> > 
> > Im trying to build a swig wrapper to a c library using go build. I know 
> the 
> > swig interface file is good as it builds correctly with the swig command 
> and 
> > generated the expected go wrapper file and the wrapper c file. I know it 
> has 
> > built because if I change the include paths in my  CGO_CFLAGS 
> environment 
> > variable the build fails to find the c library headers and fails. So it 
> > looks like it is building ok, but I dont see the go wrapper file 
> generated 
> > anywhere. Is this created as a temporary file and then discarded after 
> the 
> > build completes? Is there any way of forcing go build to output the swig 
> > wrappers in a specified directory? 
>
> There is no way to tell `go build` to put the SWIG output in a 
> specific place.  But you can use the -work option to preserve the 
> temporary directory where the SWIG outputs are generated, and the -x 
> option to see the exact commands that `go build` is executing. 
>
> 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