Can Go functions be called by C++
or C#
code on windows? Does Go support generating dll in Windows?
Go does not require any C libraries if that's what you're asking.
A DLL is a library that contains code and data that can be used by more than one program at the same time. For example, in Windows operating systems, the Comdlg32 DLL performs common dialog box related functions.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With