Is there a C header parser tool for wrapper generation like gccxml?

你说的曾经没有我的故事 提交于 2019-12-21 17:14:45

问题


I need to write a few c header wrappers for a new programming language and would like something like gccxml but without the full dependency on gcc and the problems it gives on a windows system.

Just needs to read C not C++. Output in any format is okay as long it is fully documented.

Need it for Curl, SQLite, GTK2, SDL, OpenGL, Win32 API and C posix API's on Linux/Solaris/FreeBSD/MacOSX.


回答1:


VivaCore is very cool. Have you tried SWIG the wikipedia page on ffi has some good links too. I think there is a MSVC codedom example that does C also.




回答2:


See our SD C Front End for DMS. Full C parsing, symbol table construction, post parsing dump of any information you like. Can dump code and symbol tables in XML format.




回答3:


You may like pycparser in Python. Used in CFFI and other awesome projects.



来源:https://stackoverflow.com/questions/1742171/is-there-a-c-header-parser-tool-for-wrapper-generation-like-gccxml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!