1 Building wxGTK port with Win32 GDK backend
2 ------------------------------------------
4 GTK+ widget toolkit has multiple GDK backends and one of them is Win32.
5 It is a wrapper around Windows API.
7 See http://www.gtk.org/download/win32.php
9 These notes don't consider building wxGTK with X11 backend under Windows.
13 1. wxGTK/Win32 build is similar to wxMSW one and you should have configured
14 and be able to build wxWidgets as described in docs/msw/install.txt
16 2. wxGTK/Win32 is disabled by default in wxWidgets, you need to enable it
17 in bakefiles manually. TOOLKIT variable should not be a constantly MSW
18 for required bakefile formats.
21 diff build/bakefiles/config.bkl build/bakefiles/config.bkl
22 --- build/bakefiles/config.bkl
23 +++ build/bakefiles/config.bkl
27 <!-- We must make TOOLKIT a constant under Windows -->
28 - <if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
29 + <!--if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
30 <set var="TOOLKIT">MSW</set>
38 Regenerate required make/project files:
42 3. Download GTK+ for Windows and uncompress files in the directory
43 without spaces in the name. We suppose later that GTK+/Win32 is
44 in the C:\gtk directory.
46 http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+_2.24.10-1_win32.zip
50 4.1 If you are using Visual C++ project files you need to setup GTK+ 2 include directories
51 C:\gtk\lib\include\gtk-2.0
52 C:\gtk\lib\include\glib-2.0
53 C:\gtk\lib\include\cairo
54 C:\gtk\lib\include\pango-1.0
55 C:\gtk\lib\include\gdk-pixbuf-2.0
56 C:\gtk\lib\include\atk-1.0
57 C:\gtk\lib\glib-2.0\include
58 C:\gtk\lib\gtk-2.0\include
64 See http://msdn.microsoft.com/en-us/library/t9az1d21(v=vs.90).aspx
66 Open solution file in build\msw directory, select "GTK+ Debug" solution
67 configuration and build the solution. To be sure that everything is as expected
68 you can build minimal sample.
70 GTK+ is linked to wxWidgets always as DLL, so C:\gtk\bin directory should be
71 in %PATH% environment variable before application run.
73 4.2 You can also build using nmake:
75 set INCLUDE=C:\gtk\lib\glib-2.0\include\;C:\gtk\lib\gtk-2.0\include\;C:\gtk\include\cairo\;C:\gtk\include\pango-1.0\;C:\gtk\include\gtk-2.0\;C:\gtk\include\glib-2.0\;C:\gtk\include\gdk-pixbuf-2.0\;C:\gtk\include\atk-1.0\;
77 set PATH=C:\gtk\bin\;%PATH%;
79 nmake -f makefile.vc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
83 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gtk-2.0
84 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\glib-2.0
85 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\cairo
86 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\pango-1.0
87 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\gdk-pixbuf-2.0
88 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\include\atk-1.0
89 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\glib-2.0\include
90 set CXXFLAGS=%CXXFLAGS% -IC:\gtk\lib\gtk-2.0\include
92 set LDFLAGS=%LDFLAGS% -LC:\gtk\lib
93 set PATH=C:\gtk\bin\;%PATH%;
95 mingw32-make -f makefile.gcc "TOOLKIT=GTK" "TOOLKIT_VERSION=2"
97 5. Now you can use wxGTK/Win32 as wxMSW in your applications.