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
Given the following setup, Open fails because the plugin package is looking for the symbol a/a.Hello instead of a.Hello. We should strip the path before looking up for the symbols.
tree
.
├── a
│ ├── a.go
│ └── a.so
└── main.go
$ cat main.go
package main
import (
"log"
"plugin"
)
func main() {
p, err := plugin.Open("a/a.so")
if err != nil {
log.Fatal(err)
}
s, err := p.Lookup("Hello")
if err != nil {
log.Fatal(err)
}
log.Println(s)
}
$ go run main.go
2016/10/27 09:46:14 plugin.Open: could not find symbol Hello: dlsym(0x4700010, a/a.Hello): symbol not found
exit status 1
The text was updated successfully, but these errors were encountered:
Given the following setup, Open fails because the plugin package is looking for the symbol
a/a.Hello
instead ofa.Hello
. We should strip the path before looking up for the symbols.The text was updated successfully, but these errors were encountered: