GLib is a core framework to build multi-platform application.
This is how to build its 2.38.2 version for Windows XP.
Prerequisites
- Windows XP OS. For testing purposes, you can consider VM from IEVMS.
- MSYS2 Base for i686 arch. By time this is written, I use msys2-base-i686-20140507.tar.xz.
- GCC & make. If not installed in MSYS2, it can be done using pacman:
pacman -S gcc make
(I have built poppler using GCC 4.5.2 for compat). - Python 2.5+. Under MSYS2 it can be installed with
pacman -S python
(with that, I currently have Python 3). - ZLib, FFI & gettext (
pacman -S zlib-devel libffi-devel gettext-devel
).
In MSYS2 launched using its mingw32_shell; Let's build it.
- Download sources for GLib 2.38.2:
cd tmp && wget http://sources/url
. I can't build more recent version on winxp. - Extract thoses sources:
xz -dv glib-2.38.2.tar.xz && tar -xvf glib-2.38.2.tar
. - In sources directory, configure it:
cd glib-2.38.2 && CPPFLAGS="-march=i686 -D_WIN32_WINNT=0x0501" ./configure --prefix=/usr --with-python=$(which python)
.CPPFLAGS="-march=i686 -D_WIN32_WINNT=0x0501"
is required to ensure OS is properly detected while building GLib.
- Then finally make it:
make install
(or justmake
if you don't want to install it).
Ok, but you are using MSYS2 GCC (and MSYS2 packages) which doesn't generate anything except MSYS2 executables, which are quite similar to Cygwin executables.
What is your goal here? To build Glib for Windows XP 32bit or to build Glib for Windows MSYS2 32bit? They are two very different things.