Re: [go-nuts] Beginner Questions about C shared library functionality

2019-11-20 Thread Ian Lance Taylor
On Wed, Nov 20, 2019 at 4:14 AM wrote: > > While browsing the examples at https://golang.org/misc/cgo/ I noticed that a > lot of them don't actually specify `package main`. Yet all the C shared lib > tutorials say that all my exported code has to be in `package main`. > > I need to have some cod

[go-nuts] Beginner Questions about C shared library functionality

2019-11-20 Thread randomshinichi4869
While browsing the examples at https://golang.org/misc/cgo/ I noticed that a lot of them don't actually specify `package main`. Yet all the C shared lib tutorials say that all my exported code has to be in `package main`. I need to have some code translating between Go and C, do I really have to