douningqiu4991 2013-11-10 03:51 采纳率: 0%
浏览 415
已采纳

是否可以将go软件包打包为.so或.a文件?

Recently I have spent some time on cgo and how to write C codes in go. It seems very easy to load a .so file by using #cgo directives. However, are there any ways that we can do this in a opposite way? That is, can we build a go package to a .so or .a file so that it can be used by c/c++ projects directly?

  • 写回答

1条回答 默认 最新

  • doumei1203 2013-11-10 08:47
    关注

    The answer is Go code can't be dynamically loaded into C code yet.

    There is some activity on making this possible, but it isn't ready now.

    See the discussion at on the mailing list.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度