The default gc toolchain is fine.

Use appropriate LDFLAGS or pkg-config directive in the import "C" comments. 
Then use the library like you would use any other library.

See the libpng example in the cgo documentation 
<https://golang.org/cmd/cgo/#hdr-Using_cgo_with_the_go_command>.

On Tuesday, July 4, 2017 at 9:20:32 PM UTC+2, Tejas Manohar wrote:
>
> Does anyone have examples or tips on calling methods from OS X dylib's 
> (dynamic, shared library) from Go? I have the C header file, too, but no 
> source code. Is it possible to call methods from the header file directly 
> in Go (alike a C program that `#include libproc.h`) or should I create a C 
> program in cgo-style comments with methods that call all the method 
> declarations in the header file and use that inline?
>
> Is gccgo recommended here? I'm building an OS X only program.
>

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