Tried it.
I need help with Swig and Shared lib

пятница, 4 августа 2017 г., 21:37:32 UTC+3 пользователь Ian Lance Taylor 
написал:
>
> On Fri, Aug 4, 2017 at 8:08 AM, il <ber...@gmail.com <javascript:>> 
> wrote: 
> > Your method is good for static linking. 
> > Not for Shared C++ library 
>
> Add a .go file with 
>
> /* 
> #cgo LDFLAGS: -lmylib 
> */ 
> import "C" 
>
> to get system linker flags. 
>
> Ian 
>
>
> > пятница, 4 августа 2017 г., 18:07:15 UTC+3 пользователь Ian Lance Taylor 
> > написал: 
> >> 
> >> On Fri, Aug 4, 2017 at 7:20 AM, il <ber...@gmail.com> wrote: 
> >> > I wanna use precomplied c++ library. I make test project for it. 
> >> > 
> >> > 
> >> > Mac OS Sierra Apple LLVM version 8.0.0 (clang-800.0.42.1) 
> >> > 
> >> > GO: go1.8.3 darwin/amd64 
> >> > SWIG Version 3.0.12 
> >> > 
> >> > 
> >> > swig -c++ -go -soname libapple.dylib -use-shlib -intgosize 64 
> >> > core/Apple.i 
> >> 
> >> It is much simpler to create a apple.swigcxx file in your Go sources, 
> >> and use `go build` to invoke SWIG. 
> >> 
> >> If you must run SWIG yourself, then for current versions of Go you 
> >> must use the -cgo option.  Then put the generated files with your Go 
> >> sources, and use `go build` as usual. 
> >> 
> >> 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...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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