Reputation: 1467
Can Go functions be called by C++
or C#
code on windows? Does Go support generating dll in Windows?
Upvotes: 11
Views: 11169
Reputation: 24878
No, Go code is statically linked. The reason for this is Go's runtime, which is embeded in every executable, among other things.
Edit:
It is apparently possible with a lot of indirection, but far from usable in practice. See Call go functions from C and the linked blog posts for more information.
Upvotes: 9