2012-12-05 09:54
浏览 50

Go代码可以在Windows中生成dll还是C ++ / C#可以调用golang代码?

Can Go functions be called by C++ or C# code on windows? Does Go support generating dll in Windows?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongyo7931
    dongyo7931 2012-12-05 14:12

    No, Go code is statically linked. The reason for this is Go's runtime, which is embeded in every executable, among other things.


    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.

    点赞 评论