C ++到C包装使用痛饮(用于FLTK) [英] C++ to C Wrapper using SWIG (for FLTK)
问题描述
我需要生成包装,以FLTK C ++类纯C.使用它
我知道,那SWIG能做到这一点,我知道如何为C#,Python的包装等。
但我不知道如何使用SWIG包装C ++到C。
这是简单的任务,但我无法找到答案:)请帮助。
I need to generate wrapper to FLTK C++ classes to use it in pure C. I know, that SWIG can do that, and I know how to generate wrapper for C#, Python etc. But I do not know how to wrap C++ to C using SWIG. It's simple task, but I can't find the answer :) Please, help.
推荐答案
我不认为SWIG支持C代封装的开箱即用。你总是需要指定一个目标语言。在2008年,有一个编程之夏项目写<一个href=\"http://$c$c.google.com/p/google-summer-of-$c$c-2008-swig/downloads/detail?name=Maciej_Drwal.tar.gz&can=2&q=\"相对=nofollow>Ç后端,但显然没有完成/纳入痛饮。
I don't think SWIG supports generation of C wrappers out of the box. You always need to specify a target language. In 2008, there was a GSoC project to write a C backend, but that was apparently never completed/incorporated into SWIG.
这篇关于C ++到C包装使用痛饮(用于FLTK)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!