Increment version to 1.2.0.
[platform/upstream/glib.git] / README.win32
1 For more information about the port or GLib, GTk+ and the GIMP to
2 native Windows, and pre-built binary packages, see
3 http://www.iki.fi/tml/gimp/win32/ . "Native" means that we use the
4 Win32 API only, and not any POSIX emulation layer except that provided
5 by the Microsoft runtime C library. Additionally the pthreads
6 emulation library is used.
7
8 As for now, to build GLib on Win32, you need the Microsoft compiler
9 and tools. Both the compiler from MSVC 5.0 and MSVC 6.0 have been used
10 successfully.
11
12 Before building you must get the pthreads library for Windows from
13 http://sourceware.cygnus.com/pthreads-win32/. Edit the location of the
14 pthreads library and include files in makefile.msc. Also edit the BIN
15 definition in makefile.msc.
16
17 Build with `nmake -f makefile.msc`. Install with `nmake -f
18 makefile.msc install`.
19
20 Support for building using the cygwin tools (without depending on the
21 cygwin runtime, i.e. "mingw32"), and maybe LCC-Win32 might be added
22 later. When using the cygwin tools *with* the cygwin runtime the
23 normal Unix configuration method should work as if on Unix (knock on
24 wood).
25
26 With a little work, it might be possible to use the ./configure
27 mechanism also with a "mingw32" configuration. I.e. building GLib for
28 Win32 would use the cygwin tools (and runtime), but the produced
29 libraries would not depend on the cygwin runtime being present.
30
31 The following preprocessor macros are used for conditional compilation 
32 related to Win32:
33
34 - WIN32 is defined when compiling for the Win32 platform, regardless
35   if using the X11 or Win32 windowing API (in the case of GLib, this
36   dimension isn't significant), regardless whether using a more or
37   less complete POSIX emulation runtime layer (like Cygwin) or not.
38
39 - NATIVE_WIN32 is defined when compiling for Win32, *and* without
40   any POSIX emulation, other that to the extent provided by the
41   (Microsoft) C library, or the pthreads-win32 library. For instance,
42   pathnames use the native Windows syntax.
43
44 - _MSC_VER is defined when using the Microsoft compiler.
45
46 Currently the Win32 port uses the combination with all three of those
47 on, but eventually the cygwin compiler and tools will be supported
48 also, and in that case _MSC_VER wouldn't be defined.
49
50 Some of the usage of these macros is probably a bit mixed up, and will
51 have to be straightened out when actually trying other combinations.
52
53 The pthreads for Win32 package that the thread support uses isn't
54 released yet, and thus threads really should not be relied upon.