Re: Building of win32 applications
- From: Damon Register <damonregister bellsouth net>
- To: Petr Hracek <phracek2 tiscali cz>
- Cc: gtkmm-list gnome org
- Subject: Re: Building of win32 applications
- Date: Thu, 10 Jul 2008 19:31:46 -0400
Petr Hracek wrote:
Finally I've installed MinGW to D:\Projects\XWinLinux
and MSys was installed to D:\Projects\XWinLinux\msys\1.0.
CodeBlocks is also installed to C:\CodeBlocks
If all was OK could you please help me if I have to set up some variables
in Windows?
How I can compile my programs? Could you please send me a steps?
I've already Makefile of my program.
What about GTK and all of the other things that usually go with it?
You said in your earlier post "I would like to develop some GUI interfaces"
but what you have at this point is the basic items needed to compile a
console application. There are a few different ways to do that. One
person mentioned coding the gtkmm by hand. Glade is a really nice way
to build your GUIs. I suggest using Glade to build the GUI and gtkmm
to do the programming.
I didn't find a lot of instructions for getting gtkmm working with MinGW
so it took me a little while to get it all working. Although there are
precompiled binaries for gtk and gtkmm, I found some problems with using
the gtkmm binary. I don't know how the gtkmm binary was built so I can't
be certain of this but I suspect that it was not built with MinGW (or at
least not the current version) and trying to use C++ libraries from
another compiler can be trouble. I got the gtkmm source and built it
myself.
This sample app demonstrates the problem I had with the
precompiled gtkmm. It is suppose to throw an exception that is caught
but instead my app just died. If you build this demo and it just terminates
instead of printing the exception message, then you have the problem
http://svn.gnome.org/viewvc/glibmm/trunk/examples/keyfile/main.cc?view=markup
Here is what I did to get gtk, gtkmm and supporting items working with my
MinGW/msys setup.
Summary
1. get and install MinGW and msys
2. get and install all-in-one bundle
3. get and install latest ActiveState perl
4. add or edit windows environment variables PKG_CONFIG_PATH, PATH
5. add GTK and Perl to msys PATH
6. test GTK
7. add missing gtkrc file
8. get and build libidn-1.8
9. get and build libiconv-1.9.2
10. get and build gettext-0.17
11. get and build libxml2-2.6.32
12. get and install libglade-2.6.2-20080525
13. get and build hicolor-icon-theme
14. get and build glade3-3.4.5
15. get and install gtkmm
or do following steps instead
16. get and build cairomm-1.6.0.tar.gz
17. get and build libsigc++-2.0.18.tar.gz
18. get and build glibmm-2.16.3.tar.gz
19. get and build gtkmm-2.12.7.tar.gz
20. get and build libglademm-2.6.6.tar.gz
21. get and build libxml++-2.23.2.tar.gz
1. from http://www.mingw.org/download.shtml click on
Sourceforge File Release and get
a. Automated MinGW Installer
b. from MSYS Base System, the Current Release: MSYS-1.0.10.exe
installer
c. from MSYS Supplementary Tools, the Current Release:
msysDTK-1.0.1.exe installer
install MinGW. in the choose components, select g++ compiler in
addition to what is already selected. do not select mingw make.
install msys (answer yes in post install)
install msysDTK
2. get all-in-one bundle from
http://www.gtk.org/download-windows.html
unzip and copy bundle to c:\GTK
3. Get the latest perl 5.10 at http://www.activestate.com/Products/activeperl/
Install it. I put it in c:\Perl
4. PKG_CONFIG_PATH /c/GTK/lib/pkgconfig
add c:\GTK\bin to front of PATH
5. edit C:\msys\1.0\etc\profile and put this at the front of the PATH
.:/c/GTK/bin:/c/GTK/include:/c/GTK/include/gtk-2.0:/c/GTK/include/glib-2.0:/c/Perl/site/bin:/c/Perl/bin
6. test with pkg-config --cflags --libs gtk+-2.0
7. This step is not required but is useful if you want your app to have a Windows look.
create file C:\GTK\etc\gtk-2.0\gtkrc
add this one line
gtk-theme-name = "MS-Windows"
Stop here if you are only going to write plain GTK.
8. ftp://ftp.gnu.org/pub/gnu/libidn
libidn-1.8
./configure --prefix=/c/GTK --disable-static
make
make install
9. ftp://ftp.gnu.org/pub/gnu/libiconv
libiconv-1.9.2.tar.gz (sources)
./configure --prefix=/c/GTK --disable-static
make
make install
10. http://www.gtk.org/download-windows.html
gettext-0.17.tar.gz
./configure --prefix=/c/GTK --disable-static
make
make install
11. ftp://xmlsoft.org/libxml2/
libxml2-2.6.32.tar.gz
./configure --prefix=/c/GTK --disable-static --disable-gtk-doc
make
make install
12. http://www.icewalkers.com/Linux/Software/56940/libglade.html
libglade-2.6.2.tar.gz
edit glade/glade.def to add (if it is missing)
glade_xml_construct_from_buffer
./configure --prefix=/c/GTK --disable-static --disable-gtk-doc
make
make install
13. http://icon-theme.freedesktop.org/wiki/HicolorTheme
hicolor-icon-theme-0.10.tar.gz
./configure --prefix=/c/GTK
make
make install
14. http://ftp.gnome.org/pub/GNOME/sources/glade3/3.4/
glade3-3.4.5
LDFLAGS=-L/c/GTK/lib
CPPFLAGS=-I/c/GTK/include
./configure --prefix=/c/GTK --disable-static --disable-gtk-doc
make
make install
15. This step provides all the gtkmm components but I had compatibility
problems. You may want to skip this step and do the remaining instead.
get gtkmm http://www.gustin.be/win32/gtkmm-win32-2.12.7.zip
I found this one in the gtkmm list
http://mail.gnome.org/archives/gtkmm-list/2008-April/msg00020.html
unzip gtkmm-win32 and copy into c:\GTK
Stop here, or if skipping this step, continue with the rest to build your own gtkmm.
16. http://cairographics.org/releases/
cairomm-1.6.0.tar.gz
./configure --prefix=/c/GTK
make
make install
17. http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/
libsigc++-2.0.18.tar.gz
./configure --prefix=/c/GTK
make
make install
18. http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.16/
glibmm-2.16.3.tar.gz
./configure --prefix=/c/GTK
edit Makefile to remove examples. One of the examples does not compile
make
make install
19. http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.12/
gtkmm-2.12.7.tar.gz
./configure --prefix=/c/GTK
make
make install
20. http://ftp.gnome.org/pub/GNOME/sources/libglademm/2.6/
libglademm-2.6.6.tar.gz
./configure --prefix=/c/GTK
make
make install
21. http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.23/
libxml++-2.23.2.tar.gz
./configure --prefix=/c/GTK
make
make install
Damon Register
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]