将 SWIG 与构建系统结合使用
有人有使用 SWIG(界面生成器)的经验吗?
我有一个 C 项目,我想将其暴露给许多其他语言/框架,例如 Python、Java、.NET、Perl、PHP、Ruby。
我想与我的构建系统(基于 CMake 的)集成,但任何实现此目的的方法都可以。
Anyone have experience with using SWIG (the interface generator)?
I have a C project which I would like to expose to a bunch of other languages/frameworks, like Python, Java, .NET, Perl, PHP, Ruby.
I would like to integrate with my build system (which is CMake-based), but any method of accomplishing this will do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
CMake 附带了一个用于构建 SWIG 包装器的模块。
您的 CMakeLists.txt 应包含如下内容:
请参阅 http://www.itk.org /Wiki/CMake_FAQ#How_do_I_use_CMake_to_generate_SWIG_wrapper_libraries.3F 了解更多详细信息(上面的示例取自那里...)
CMake comes with a module for building SWIG wrappers.
Your CMakeLists.txt should include something like this:
See http://www.itk.org/Wiki/CMake_FAQ#How_do_I_use_CMake_to_generate_SWIG_wrapper_libraries.3F for more details (the above example is taken from there...)