美文网首页
ubuntu安装mrpt的依赖wxWidgets报GSocket

ubuntu安装mrpt的依赖wxWidgets报GSocket

作者: 送分童子笑嘻嘻 | 来源:发表于2020-02-19 19:55 被阅读0次

ubuntu安装mrpt的依赖wxWidgets报GSocket错

./include/wx/gsocket.h:40: error: using typedef-name 'GSocket' after 'class'
/usr/include/glib-2.0/gio/giotypes.h:120: error: 'GSocket' has a previous declaration here
In file included from ./include/wx/gsocket.h:179,

    from ./src/gtk/gsockgtk.cpp:21:

症结在于gtk+与wxWindgets2.8.10中共同定义了 GSocket。
修改gtk+显然不太合适,所以就改wxWidgets咯,修改一下wxWidgets的源代码:

解决如下:
进入wxwidgets的/src/gtk/gsockgtk.cpp
#define GSocket GlibGSocket //add
#include <gdk/gdk.h>
#include <glib.h>
#undef GSocket //add

相关文章

网友评论

      本文标题:ubuntu安装mrpt的依赖wxWidgets报GSocket

      本文链接:https://www.haomeiwen.com/subject/qjlzfhtx.html