我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

golang:在跨平台中调用C ++代码

Is there a way to call C++ code from Go ? I need to call C++ code in Windows and Mac. Does Go language support cross language integration?

SWIG and Go

Go is a compiled language, not a scripting language. However, it does not support direct calling of functions written in C/C++. The cgo program may be used to generate wrappers to call C code from Go, but there is no convenient way to call C++ code. SWIG fills this gap.

Use SWIG.

近期文章

  • 如何在POST数据包中添加HTTP标头?
  • golang http超时和goroutines累积
  • 将db变量传递给函数参数
  • 去郎执行/产生一个SSH会话
  • 为什么gdb输出致命错误?
  • 限制pq连接SetMaxOpenConns
  • 数据未通过通道发送
  • 将strconv.ParseInt与int一起使用的惯用方式
  • Golang和MongoDB:带过滤器的DeleteMany
  • GAE GO数据存储区中最大的数据类型
  • 用于解组JSON数组的Go结构
  • 如何在Go中从interface {}变量中提取字符串?
  • Golang JSON编码,可用于JavaScript解析
  • 并发Goroutine互斥
  • Golang中的json-rpc,id为字符串
  • 编写一个可以使用2个数据库的应用程序? [关闭]
  • 如何从中间件记录响应主体?
  • 如何在Go中构建抽象的json解组器
  • 使用Go MySQL无法检索输出参数
  • 如何更改GUI组件的颜色

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华