Hello
I am able to link the C library (.so) dynamically in my go code by doing following
setting LD_LIBRARY_PATH and exporting the path to .so file
setting the CFLAGS and LDFLAGS as below while building go code
CGO_CFLAGS="-I$(GOPATH)/<pathtoinclude>" CGO_LDFLAGS="-L$(GOPATH)/<path where the .so file is present>" go build
go code looks like
/*
#cgo LDFLAGS: -l<xxx>
#include <stdlib.h>
#include "c.h"
*/
import "C"
...
This works very well.
My aim now is to link the static library to the go code. I searched on web, but could not find right solution
Please suggest