Fixed wxGTK/Windows build with Visual C++ and MinGW
|Reported by:||kosenko||Owned by:|
I have fixed wxGTK build under Windows using Visual C++ and MinGW compilers with Win32 (not X11) backend.
I have tested in Visual C++ 2008 and MinGW/cmd.exe GCC 4.5.2 under Windows XP SP3.
wxGTK port under Windows can be useful:
A) to get same widgets behavior under Linux and Windows (GNOME look&feel under Windows)
B) for applications under Windows that have strong GTK+ third party dependencies
C) for debugging under Windows wxGTK-based applications
- __WXMSW__ macro was replaced with __WINDOWS__ one where it was required in non-GUI code. It is because of wxGTK is not based on wxMSW widgets.
- Bakefiles was modified with same approach as wxUniv port. It looks ugly but it works.
- Two *.c files was renamed to *.cpp ones because of Visual C++ has problems with mixing C and C++ in PCH.
- I have used Windows Resources (RC) instead of XPM because first it is included in executables and it is native under Windows. Also I have added wxHAS_RESOURCE_FILES macro to indicate if current platform supports resource files.
- Disabled some features:
- WebView/GTK+ (wxWebView) and GStreamer(wxMediaCtrl) looks like not implemented under Windows.
- wxGLCanvas, wxUIActionSimulator and partially keyboard handling has strong dependencies on X11 code.
- Enabled some Windows features: DIB, Dialup and OLE Automation.
You can build wxGTK/Windows port in the same way as wxUniv one:
- Set WXGTK=1 in command line tools (mingw and nmake)
- Select "GTK+ Debug" in Visual C++
I have used following GTK+ binaries:
Before compilation you need to add include folders:
and libs folder: <you_gtk_path>\lib
wxGTK under Windows uses gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib, this libs is linked automatically using bakefiles.
Latest source codes is available in
Change History (59)
comment:1 follow-up: ↓ 2 Changed 2 years ago by vadz
- Milestone set to 3.0
- Status changed from new to confirmed
Changed 22 months ago by kosenko
Changed 17 months ago by kosenko
Changed 16 months ago by kosenko
comment:50 Changed 15 months ago by vadz
- Resolution fixed deleted
- Status changed from closed to reopened