In the wx forums they say I should use gtk1.x instead of gtk2. But then I should use wx 2.6.3 instead of 2.8.4 because of some refresh problems. I compiled wx 2.6.3 against gtk1.x and installed it. Works fine.
But now I have to recompile CB to work with wx2.6.3
Compiling outputs:
make[3]: Betrete Verzeichnis '/home/bla/software/codeblocks/src/sdk/wxFlatNotebook'
/bin/bash ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I../../../src/include/wxFlatNotebook/include -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxFlatNotebook.lo -MD -MP -MF .deps/wxFlatNotebook.Tpo -c -o wxFlatNotebook.lo `test -f 'src/wxFlatNotebook/wxFlatNotebook.cpp' || echo './'`src/wxFlatNotebook/wxFlatNotebook.cpp
g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -I../../../src/include/wxFlatNotebook/include -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT wxFlatNotebook.lo -MD -MP -MF .deps/wxFlatNotebook.Tpo -c src/wxFlatNotebook/wxFlatNotebook.cpp -fPIC -DPIC -o .libs/wxFlatNotebook.o
src/wxFlatNotebook/wxFlatNotebook.cpp: In member function 'virtual int wxPageContainer::HitTest(const wxPoint&, wxPageInfo&, int&)':
src/wxFlatNotebook/wxFlatNotebook.cpp:1125: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1134: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1138: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1145: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1162: error: 'class wxRect' has no member named 'Contains'
src/wxFlatNotebook/wxFlatNotebook.cpp:1190: error: 'class wxRect' has no member named 'Contains'
make[3]: *** [wxFlatNotebook.lo] Fehler 1
make[3]: Verlasse Verzeichnis '/home/bla/software/codeblocks/src/sdk/wxFlatNotebook'
So I cannot compile it...
Another thing:
I configured CB for compiling using "configure". It says I need to install gtk2-dev to compile. Why this??? It does not work with gtk2-dev? I thought it uses wxWidgets? And my wxWidgets is compiled against GTK1..
Weird... I cannot compile it anymore. :shock:
./configure:
checking for wx-config... no
configure: error:
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWindows version is 2.6.0 or above.
wxWidgets is installed (2.8.4) with the official Packages. But wx-config is not available. That is unbelievable. I deinstalled wxWidgets and replaced it with a selfcompiled one. Now, I deinstalled that and installed wxWidgets as it was before.
You said I should use an older version of CB and tried that. But this doesnt compile with wxWidgets-GTk1 aswell.
make[4]: Betrete Verzeichnis '/home/aaaah/codeblocks4310/src/plugins/debuggergdb'
/bin/bash ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -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/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../src/include -I../../../src/include/wxscintilla/include -I../../../src/include/scripting/include -I../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT gdb_tipwindow.lo -MD -MP -MF .deps/gdb_tipwindow.Tpo -c -o gdb_tipwindow.lo gdb_tipwindow.cpp
g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib/wx/include/gtk-ansi-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA -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/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../src/include -I../../../src/include/wxscintilla/include -I../../../src/include/scripting/include -I../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT gdb_tipwindow.lo -MD -MP -MF .deps/gdb_tipwindow.Tpo -c gdb_tipwindow.cpp -fPIC -DPIC -o .libs/gdb_tipwindow.o
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:32,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from gdb_tipwindow.cpp:40:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:66:1: warning: "GTK_CLASS_TYPE" redefined
In file included from /usr/include/glib-2.0/glib.h:68,
from /usr/include/gtk-2.0/gdk/gdktypes.h:32,
from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from gdb_tipwindow.cpp:40:
/usr/include/glib-2.0/glib/gspawn.h:113:63: warning: this is the location of the previous definition
In file included from /usr/include/gtk-2.0/gtk/gtkwidget.h:32,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:33,
from /usr/include/gtk-2.0/gtk/gtkbin.h:32,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:33,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:28,
from /usr/include/gtk-2.0/gtk/gtk.h:32,
from gdb_tipwindow.cpp:40:
/usr/include/gtk-2.0/gtk/gtkobject.h:46:1: warning: "GTK_OBJECT_GET_CLASS" redefined
In file included from /usr/include/glib-2.0/glib.h:68,
from /usr/include/gtk-2.0/gdk/gdktypes.h:32,
from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from gdb_tipwindow.cpp:40:
/usr/include/glib-2.0/glib/gspawn.h:112:63: warning: this is the location of the previous definition
/usr/include/gtk-2.0/gdk/gdktypes.h:76: error: conflicting declaration 'typedef struct _GdkAtom* GdkAtom'
/usr/include/wx-2.6/wx/defs.h:2761: error: 'GdkAtom' has a previous declaration as 'typedef gulong GdkAtom'
/usr/include/gtk-2.0/gdk/gdktypes.h:102: error: conflicting declaration 'typedef struct _GdkDrawable GdkBitmap'
/usr/include/wx-2.6/wx/defs.h:2763: error: 'GdkBitmap' has a previous declaration as 'typedef struct _GdkWindow GdkBitmap'
/usr/include/gtk-2.0/gdk/gdktypes.h:103: error: conflicting declaration 'typedef struct _GdkDrawable GdkPixmap'
/usr/include/wx-2.6/wx/defs.h:2764: error: 'GdkPixmap' has a previous declaration as 'typedef struct _GdkWindow GdkPixmap'
/usr/include/gtk-2.0/gdk/gdktypes.h:104: error: conflicting declaration 'typedef struct _GdkDrawable GdkWindow'
/usr/include/wx-2.6/wx/defs.h:2762: error: 'GdkWindow' has a previous declaration as 'typedef struct _GdkWindow GdkWindow'
make[4]: *** [gdb_tipwindow.lo] Fehler 1
make[4]: Verlasse Verzeichnis '/home/aaaah/codeblocks4310/src/plugins/debuggergdb'
Howto disable GTK2 then?? I build wxWidgets with GTK1
../configure --disable-gtk2 --enable-optimise --enable-shared --disable-debug --disable-profile --prefix=/usr --with-gtk=1 --disable-unicode
But if I want to compile CB with this wxWidgets it says that it need GTK-2.0-dev. So installed the GTK2 development files for ubuntu.
And I do not know howto disable ansi, whatever this means...
Here is the output of CB's configure script if I deinstalled GTK-2.0-dev
checking for GTK2... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:
No package 'gtk+-2.0' found
configure.in contains:
if test "x$HAVE_PKG_CONFIG" = "xyes"; then
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0)
fi
...
WX_GTK2_CFLAGS=
WX_GTK2_LIBS=
...
WX_BASENAME=`$WX_CONFIG_WITH_ARGS --basename`
case $WX_BASENAME in
*wx_gtk*)
AC_MSG_RESULT(wxGTK)
WX_GTK2_CFLAGS="$GTK2_CFLAGS"
WX_GTK2_LIBS="$GTK2_LIBS"
;;
so because none of that checking stuff seems to actually do anything specific to GTK2, try deleting
if test "x$HAVE_PKG_CONFIG" = "xyes"; then
PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0)
fi
and see what errors you get.
taking a quick look, you should be able to just comment out these line of plugins/debuggergdb/gdb_tipwindow.cpp (at ~line 39):
#ifdef __WXGTK__
#include <gtk/gtk.h>
#endif
and then make sure wxUSE_POPUPWIN is never #defined...
then bootstrap, configure (with the alteration i suggested earlier), make