You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created main.go , in main i called a function Sample() .
package main
func main(){
// call Sample
}
i have created Test directory in goworkspace/src .in Test i have have test.go file.
//test.go
package Test
import "fmt"
func Sample(){
fmt.Println("call Sample function")
}
I created .so file of Test directory by using go build -builmode=shared -linkshared Test. This command create libTest.so file in goworkspace/pkg/linux_amd64_dynlink. i want to use Sample function inside the main.
how can i link this shared library with my main function and call Sample function.
Go version - 1.15.1 linux/amd64
The text was updated successfully, but these errors were encountered:
the Go project does not use its bug tracker for general discussion or asking questions about the language. The Github bug tracker is only used for tracking bugs and proposals going through the Proposal Process.
Please see the Questions wiki page; it has a list of good places for asking questions. Thanks!
I created main.go , in main i called a function Sample() .
package main
func main(){
// call Sample
}
i have created Test directory in goworkspace/src .in Test i have have test.go file.
//test.go
package Test
import "fmt"
func Sample(){
fmt.Println("call Sample function")
}
I created .so file of Test directory by using go build -builmode=shared -linkshared Test. This command create libTest.so file in goworkspace/pkg/linux_amd64_dynlink. i want to use Sample function inside the main.
how can i link this shared library with my main function and call Sample function.
Go version - 1.15.1 linux/amd64
The text was updated successfully, but these errors were encountered: