Re: compiling GTK app in WIndows
- From: Tor Lillqvist <tml iki fi>
- To: regatta <regatta gmail com>
- Cc: gtk-list gnome org
- Subject: Re: compiling GTK app in WIndows
- Date: Wed, 18 Jan 2006 10:43:51 +0200
regatta writes:
> Can anyone send to me a link for how to compile a new GTK project
> in Windows ?
Well, how to do it depends very much on whether this is just something
you want to do this once, for yourself only, or whether it's something
you want to package up in a source file distribution and have others
build, too. It depends on what toolset and "tool philosophy" you are
partial to.
But basically, compiling a GTK application on Windows is much like
compiling a non-GTK application. You must first understand how to do
that. Always start with Hello, world....
Then, to compile the GTK application you do it the same way, and in
addition tell the compiler where to find GTK+'s headers, and where to
find the GTK+ libraries. As such, the above is quite straightforward,
in theory.
> my project is simple and one of my goals is to run it in Windows and
> Linux (the Linux part is easy, but I have no idea about Windows).
Well, how do you do it on Linux? Do you have a manually written
Makefile? Do you use pkg-config or do you manually write in the CFLAGS
and LIBS? Do you use Automake? Configure scripts? Autoconf? Libtool?
All of these tools are available for Windows, too. Although, as there
is no package management system on Windows you will have find them
packaged first and install them. (Or you could even install them from
source.)
> another think, if I want to use extra library in my program (e.g curl
> library) , how can I add it to Makefile and configure file to check
> and make sure its available in the system) ?
So you do use a configure file (and presumably Autoconf to generate
it). If so, the same Autoconf macros (AC_CHECK_LIB, AC_CHECK_HEADERS,
etc) can be used. After all, that's the point of the auto* tools, to
aid portability.
If you install MSYS (including the MSYS Developer Toolkit) you get a
quite well functioning Autoconf and Automake. The Libtool version
included in MSYS is said to be less then perfect, use the one from
gnuwin32.sourceforge.net instead.
For more hints, see for instance the relevant parts of
http://www.go-evolution.org/Building_Evolution_on_Windows
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]