-
Notifications
You must be signed in to change notification settings - Fork 17.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go1.10 build c-shared for to windows dll #23052
Comments
I'm sorry, I'm not really sure what you mean by any of this. Can you be more specific? Is there any connection between the four things you mention? |
Sorry, my English is poor. test.gopackage main
import "C"
func main(){
}
//export Add
func Add(x,y int)int{
return x+y
}
//export AddStr
func AddStr(x,y string)string{
return x+y
} Use the cmd to build(host:windows/amd64,go1.10b1):
Yes,i make it,but i have questions:
to solve, I hope we can compile this time instead of running to deal with this issue;
Thanks again. |
I think these problems will be easier to fix if you file separate issues for separate problems. Regarding point 3, an exported Go function is not permitted to return a Go string. See https://tip.golang.org/cmd/cgo/#hdr-Passing_pointers . |
Yes, these issues can be solved manually, but if the merger into the official code may have a better experience? I will modify the source code after the official version go1.10 released, thank you. |
@Baozisoftware
when I use this in the VC++ project, VS said "Warning LNK4003 invalid library format; library ignored" any solution? |
@shyandsy This issue is closed. I recommend that you use a forum to ask your question. Please see https://golang.org/wiki/Questions . |
Glad to see go1.10 support compiled dll, but the following questions (suggestions):
Here's the old version of the implementation:
disable cgocheck for golang default
go build to windows dll
Thank golang team for their hard work.
The text was updated successfully, but these errors were encountered: