如何让 Doxygen 解析包含 __cdecl 的函数指针 typedef?
当使用 MS C 或 GNU C 时,需要使用 __cdecl,函数指针原型如下所示:
- typedef int (__cdecl *funcname_ptr)(void* arg1, const char* arg2 );
- typedef int(__attribute__((cdecl)) *funcname_ptr)(void* arg1, const char* arg2);
看来 *funcname_ptr 之前的文本会导致 doxygen 的解析器失败。
如果您遇到了这个问题,您找到解决方法了吗?
When using MS C or GNU C where you need to use __cdecl, function pointer prototypes look like:
- typedef int (__cdecl *funcname_ptr)(void* arg1, const char* arg2);
- typedef int(__attribute__((cdecl)) *funcname_ptr)(void* arg1, const char* arg2);
It seems that the text prior to *funcname_ptr causes doxygen's parser to fail.
If you have run into this issue, have you found a workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有遇到这个问题,但一种解决方法可能是使用 预定义选项。
I haven't encountered this problem, but one workaround may be to predefine __cdecl as a macro that evaluates to nothing in the doxygen configuration file using the PREDEFINED option.