Gabor Szabo wrote:
I tried to buld wxWidgets with these flags
./configure --with-gtk --disable-shared --enable-unicode
and got this error in the make phase:
home/szabgab/.perldist_xl/src/wxWidgets-2.8.10/bk-deps g++ -c -o
corelib_gtk_gsockgtk.o -I./.pch/wxprec_corelib -D__WXGTK__
-I./src/tiff -I./src/regex -DwxUSE_BASE=0 -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES
-I/home/szabgab/.perldist_xl/src/wxWidgets-2.8.10/lib/wx/include/gtk2-unicode-release-static-2.8
-I./include -D_REENTRANT -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/directfb
-I/usr/include/libpng12 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -DWX_PRECOMP -pthread -Wall -Wundef
-Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ./src/gtk/gsockgtk.cpp
In file included from ./src/gtk/gsockgtk.cpp:21:
./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:
Please try the attached patch to wxWidgets.
I once already managed to build wxWidgets via Alien but now I am
trying to build it --disable-shared
I think the problem depends on the wxWidgets/GTK+/Glib versions you
are using, not on the --disable-shared flag.
Regards,
Mattia
diff -r -u src/gtk/gsockgtk.cpp src/gtk/gsockgtk.cpp
--- src/gtk/gsockgtk.cpp 2009-10-12 12:31:05.852113325 +0200
+++ src/gtk/gsockgtk.cpp 2009-10-12 12:31:30.832115248 +0200
@@ -15,8 +15,10 @@
#include <stdlib.h>
#include <stdio.h>
+#define GSocket GlibGSocket
#include <gdk/gdk.h>
#include <glib.h>
+#undef GSocket
#include "wx/gsocket.h"
#include "wx/unix/gsockunx.h"