Go 使用swig使用C++11代码的问题

xpbhere · 2015-10-12 09:42:37 · 3811 次点击 · 大约8小时之前 开始浏览    置顶
这是一个创建于 2015-10-12 09:42:37 的主题,其中的信息可能已经有所发展或是发生改变。

请问下有没有使用swig调用c++11代码的成功案例?

我这边按照 http://www.swig.org/Doc3.0/Go.html 一文的提示操作,在调用 go install 时会出现 “This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.” 的提示。

不知道这个问题要如何解决呢?


有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

3811 次点击  
加入收藏 微博
4 回复  |  直到 2015-10-13 02:26:45
qkb_75_go
qkb_75_go · #1 · 9年之前

SWIG 的手册里有专门对 c++11 的说明的。好像是在 TCL 章节吧。

xpbhere
xpbhere · #2 · 9年之前

看着比较复杂,时间比较赶,以后再慢慢研究。 现在用cgo的方案解决问题了。

xpbhere
xpbhere · #3 · 9年之前
qkb_75_goqkb_75_go #1 回复

SWIG 的手册里有专门对 c++11 的说明的。好像是在 TCL 章节吧。

时间比较赶,以后有时间再研究。

qkb_75_go
qkb_75_go · #4 · 9年之前

SWIG supports the new C++ syntax changes with some minor limitations in some areas such as decltype expressions and variadic templates. Wrappers for the new STL types (unordered_ containers, result_of, tuples) are incomplete. The wrappers for the new containers would work much like the C++03 containers and users are welcome to help by adapting the existing container interface files and submitting them as a patch for inclusion in future versions of SWIG.

添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传