On Thu, Sep 28, 2017 at 10:02 PM, <
desaia...@gmail.com> wrote:
>
> Can you please provide command line to build executable using library
>
> go build -linkshared main.go
>
> -linkshared not supported on darwin/amd64
>
>
> doesn't work
You asked about creating either a static or dynamic library, and I
explained how to create a static library.
You are correct that building a dynamic library is not supported on
Darwin at present. It's only supported on GNU/Linux. It would be
nice if someone looked into that on Darwin. I don't know how hard it
would be.
Ian
> On Friday, September 29, 2017 at 9:55:53 AM UTC+5:30, Ian Lance Taylor
> wrote:
>>
>> On Thu, Sep 28, 2017 at 9:21 PM, <
desaia...@gmail.com> wrote:
>> >
>> > Want to create libraries ( static or dynamic ) so that that I don't want
>> > to
>> > compile every time when I build my executable
>> >
>> > "
github.com/everjit/Ion" <--- should not refer to code rather it should
>> > refer to build library like .so or .dll ( in windows ) and will provide
>> > that
>> > to go build command line.
>> >
>> > package main
>> >
>> > import (
>> > "
github.com/everjit/Ion"
>> > "strings"
>> > }
>> >
>> > func main(){
>> > Ion.Invoke()
>> > }
>> >
>> > Please help
>>
>> To create static libraries, run `go install`. For example, `go
>> install
github.com/everjit/lon`.
>>
>> 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.
> For more options, visit
https://groups.google.com/d/optout.