使用下面命令来编译:
windows
# go build -buildmode=c-shared -o libhello.dll .\libhello.go
linux / mac
# go build -buildmode=c-shared -o libhello.so ./libhello.go
使用下面命令来编译:
windows
# go build -buildmode=c-shared -o libhello.dll .\libhello.go
linux / mac
# go build -buildmode=c-shared -o libhello.so ./libhello.go