Closed fdev31 closed 10 years ago
I never had this error, maybe the problem is in wxgtk-3.0.0. I've found this thread where the issue seems similar: http://forums.wxwidgets.org/viewtopic.php?t=37593&p=153082
Be sure to to a "make clean", then try to do a "./configure --with-gtk=2", then "make" and "make install" to force the use of GTK+2 instead of GTK+3... But it's quite strange, I've successfully built GD on Ubuntu with GTK+3.
Try to build Game Develop using WxWidgets 3.0.1.
It should be fixed with GTK3 and wxWidgets 3.0.1, I'm closing the issue, re-open another one if still facing a similar issue :)
today I tried building GD on fedora-20-x86_64 and I have the same error, what is the solution ? using wxWidgets-3.0.1
Could you paste here the errors messages ? First, you could check if wxWidgets is built to be used with GTK3 (as GD is now referring explicitly to GTK3, such error will arise if wxWidgets is built using GTK2) (and so my previous messages were probably wrong, when I said to use --with-gtk=2! On the contrary, GTK3 should always be used).
I reopen the issue so that we can try to find a solution. :smiley:
today I tried to build it again after building wxwidgets with ./configure --with-gtk=2 and it gave me the same error, and it looks like it still includes gtk3 !
[ 7%] Building CXX object Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp.o
In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:30:0,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from /usr/include/gtk-3.0/gdk/gdkx.h:28,
from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp:37:
/usr/include/gtk-3.0/gdk/gdktypes.h:127:39: error: conflicting declaration ‘typedef struct _GdkWindow GdkWindow’
typedef struct _GdkWindow GdkWindow;
^
In file included from /usr/local/include/wx-3.0/wx/event.h:14:0,
from /usr/local/include/wx-3.0/wx/window.h:18,
from /usr/local/include/wx-3.0/wx/panel.h:19,
from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.h:10,
from /mnt/4/Downloads/Linux/GameDevelopment/GameDevelop/GD/Core/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp:7:
/usr/local/include/wx-3.0/wx/defs.h:3414:33: error: ‘GdkWindow’ has a previous declaration as ‘typedef struct _GdkDrawable GdkWindow’
typedef struct _GdkDrawable GdkWindow;
^
make[2]: *** [Core/CMakeFiles/GDCore.dir/GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.cpp.o] Error 1
make[1]: *** [Core/CMakeFiles/GDCore.dir/all] Error 2
Yes, as I said in my previous comment GTK3 is always included and used by GD. So wxWidgets has to use it: try to compile wxWidgets with ./configure --with-gtk=3
:wink:
I've already built GD on Arch Linux x64 and I needed some special config for wxwidgets as GCC 4.9.0/1 has a bug with wxwidgets : you should add -fno-strict-aliasing to the CXXFLAGS when using ./configure
So the commandline to use to build wxWidgets should be ./configure CXXFLAGS="-fno-strict-aliasing" --with-gtk=3
(@victorlevasseur, correct me if I make a mistake :))
Yes, but I don't remember if that fixed this error and no another one.
[4ian] well, building wxwidgets with ./configure --enable-ribbon --enable-webview --with-gtk-3 successfully builds. using gcc 4.8 thanks for your help.
[victorlevasseur] using 4.8 gcc, so no need for -fno-strict-aliasing CXXFLAGS, thanks
something weird though, the web export only works with firefox, but not chrome, any one know why ?
Excellent!! I close the issue. For the web export, exported files should be sent to a web server otherwise Chrome disallow the loading of local files. :) (When previewing, GD creates a mini web server so that it works with any browser).
Do you think you would be able to create a package for Archlinux ?
You want me to create an rpm for Archlinux you mean ?
I totally forgot about chrome not loading files without a web server, thanks
@4ian you should add a note in the doc to say that you cant use GCC 4.9.
@FocusGFX Yes, if you have some spare time, you could create a rpm :smile: (or better, a script that is used to create it, like a PKGBUILD script).
@victorlevasseur Is the error with GCC 4.9 only related to wxWidgets?
[4ian] actually, I'm in a middle of a project right now, but I guess I'll finish it by tomorrow or the day after. when I'm done with it I'll create the rpm.
@FocusGFX Thanks, let me know if you get something working or need help! :smiley:
Oops I will no use hashtags in next comments for avoid to create references.
Using gtk-3.12.2 and wxgtk-3.0.0, I get the following traceback while building on some Archlinux system:
Is it some familiar definition conflict to you ? What are the supported gtk/wx versions ? I'm really not sure it's a bug, or eventually in the cmake files...