kavitha kannan
unread,Apr 12, 2021, 3:27:29 AM4/12/21You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am new to Go and in my current project, I have to call an external module from Go.
The external folder is C++ (wrapped with Python) and requires to access
a sub function under the c++ folder.
The shared library (.so) was included along with main.go
go /src
/main
testfile.go
headfiles.go
cprog.so
under headdfiles.go, I have declared two functions
func headfile() {}
func DelKeys() {}
In Python, the code is called in this manner.
self.__cprog = cprog.TCP(dev, headfile.getData, DelKeys, kwargs)
where headfile and DelKeys are class with own methods.
From the Go, I have challenge in calling using exec.command
cmd, err:= exec.Command("python","-c","import cprog;cprog.TCP()")
Looking for suggestions in how to access the functions from external folder (.so) file.