Win32Gtk1
How to build (X)MedCon/DLL on MS Windows using Gtk+1 ?
This is the process of getting (X)MedCon to build on the MS Windows platform, using freely available tools only. Here we use the older Gtk+-1.3.0 release, so without the built-in gdk-pixbuf functionality. But first a general remark on path differences.
As we installed our MingW/MSYS environment on a newly created e: partition, the absolute path to our $HOME directory would be for:
MS-DOS/WIN: $HOME = e:\msys\home\<username>
MingW/MSYS: $HOME = e:/msys/home/<username>
[XX] Download required tools:
- MingW/MSYS : from the "Current" section get following bin versions:
- GCC core
- MSYS .exe
- MingW Runtime
- MingW Utilities
- Windows API
- binutils
- GtkWin32 : Gtk+ port and associated packages for MS Windows (DO NOT USE THE GTK+-2.0 PACKAGES)
- gettext-runtime & gettext-tools
- glib-2.4 & glib-dev-2.4
- gtk+-1.3.0 & gtk+-dev-1.3.0
- libiconv-bin
- pkg-config
- GnuWin32 : GNU packages ported to MS Windows
- libpng-bin & libpng-lib
- zlib-bin & zlib-lib
- GdkPixbuf : get .tar.gz source package of the image display library (= 0.22.0)
- build-scripts : shift-click to download helping scripts @ 09-Jul-2004 (note: could be unzipped by your browser)
- XMedCon : get .tar.gz source package (>= 0.10.0)
[XX] Install MSYS/MingW environment + extras:
e:/mingw
and unpack extras in here
e:/msys
(note: at postinstall, use UNIX style /-slashes for path to mingw)
[XX] Prepare MingW/MSYS environment:
$HOME/.profile
and add the following lines: (using vi)
export PATH="$HOME/bin:/mingw/local/bin:/mingw/local/lib:$PATH" export LD_LIBRARY_PATH="/mingw/local/lib" export CFLAGS="-O3 -fsigned-char" export CPPFLAGS="-I/mingw/local/include" export LDFLAGS="-L/mingw/local/lib" export PKG_CONFIG_PATH="/mingw/local/lib/pkgconfig"
$HOME/bin
/mingw/local
$HOME/build
[XX] Build GdkPixbuf library
$HOME/build
$> ./configure --prefix=/mingw/local --disable-gtktest --disable-glibtest
./
main dir
./Makefile
the demo & doc references from "SUBDIR="
variable
./gdk-pixbuf/pixops
subdir
.S
in gdk-pixbuf/pixops subdir (MMX support)
pixops_ => _pixops_
(note: routines must begin with underscore)
".type ..."
)
"PROGRAMS = "
./gdk-pixbuf
subdir
#include <X11/Xlib.h>
Display gdk_pixbuf_dpy = NULL;
libgdk_pixbuf_xlib.la
from "lib_LTLIBRARIES = "
variable
JPEG_LIB, XPM_LIB & TIFF_LIB
"PROGRAMS = "
variable
$> make install
$> cd /mingw/local/lib; a2dll libgdk_pixbuf.a -L/mingw/local/lib -lgdk -lgtk -lglib-2.0 -lgmodule-2.0
[XX] Build (X)MedCon Project
$HOME/build
$> export LDFLAGS="-Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc $LDFLAGS"
$> ./configure --prefix=/mingw/local --enable-gtk1 --disable-glibtest --disable-gtktest
$> make install
Hereafter, you should at least be able to run the programs directly from the MingW/MSYS terminal window.
Have fun,
-eNlf-
(1) The resulting DLL isn't MSVC nor JNI compatible yet. Read through the entire MingW/MSYS faq on what to do afterwards.