ubuntu安裝mrpt的依賴wxWidgets報(bào)GSocket錯(cuò)

ubuntu安裝mrpt的依賴wxWidgets報(bào)GSocket錯(cuò)

./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:

癥結(jié)在于gtk+與wxWindgets2.8.10中共同定義了 GSocket。
修改gtk+顯然不太合適,所以就改wxWidgets咯,修改一下wxWidgets的源代碼:

解決如下:
進(jìn)入wxwidgets的/src/gtk/gsockgtk.cpp
#define GSocket GlibGSocket //add
#include <gdk/gdk.h>
#include <glib.h>
#undef GSocket //add

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。