Tor Lillqvist <tml@iki.fi>
Hans Breuer <hans@breuer.org>
-The general parts, and the stuff about gcc and autoconfiscated build
-are by Tor Lillqvist. The stuff about MSVC build is by Hans Breuer.
+The general parts, and the section about gcc and autoconfiscated build
+are by Tor Lillqvist. The sections about MSVC build is by Hans Breuer.
General
=======
But note that to just *use* GLib on Windows, there is no need to build
it yourself. Prepackaged runtime and developer packages are available
-from the webiste above. On Unix, it is quite normal that system admins
+from the website above. On Unix, it is quite normal that system admins
build and install libraries like GLib themselves without bothering to
look for prebuilt packages, especially if prebuilt packages tend to
use installation paths that don't conform to local customs.
Additionally, there are the compiler-specific macros:
- __GNUC__ is defined when using gcc
- _MSC_VER is defined when using the Microsoft compiler
+- __DMC__ is defined when using the Digital Mars C/C++ compiler
G_OS_WIN32 implies using the Microsoft C runtime MSVCRT.DLL. GLib is
not known to work with the older CRTDLL.DLL runtime, or the static
Autoconfiscated build (with gcc)
================================
-Tor uses gcc 3.2. Version 2.95.3 also works.
+Tor uses gcc 3.3.1. Somewhat earlier or later versions presumably also
+work.
You can either use gcc running on Cygwin, or the "pure" mingw
gcc. Using the latter might work better, or at least did at some
new libtool. (And a new libtool probably requires rather new autoconf
and automake.) Tor hasn't tested this in a while, either.
+Cross-compiling
+===============
+
+It is possible to build GLib using a cross compiler. See
+docs/reference/glib/html/glib-cross-compiling.html (part of the
+GLib reference manual) for more information.
+
Building with MSVC
==================
]
Required libraries (not build from cvs)
-==================
+------------------
libintl (gnu-intl), libiconv
libtiff, libpng, zlib, libjpeg
are available pre-built from the website mentioned above.
Versioning
-==========
+----------
Instead of the Unix and auto* way of tracking versions and resolving
dependencies (configure; make; make install) involving autoconf,
automake, libtool and friends the MSVC build uses a different
when producing his zipfiles with prebuilt GLib, GTK+ etc).
Special Files
-=============
+-------------
config.h.win32.in : @XXX_MAJOR_VERSION@ needs to be replaced by
the current version/build number. The resulting file is to be saved
as 'config.h.win32'. This should be automatically done if a package
Directory Structure
-===================
+-------------------
all modules should be build in a common directory tree otherwise you
need to adapt the file 'module.defs'. They are listed here in increasing
dependencies order.