Index

Project

Screen Shots

 Linux - MacOSX - Win32
Faq / Win32Gtk2

How to build (X)MedCon/DLL on MS Windows using Gtk+2 ?

This is the process of getting (X)MedCon to build on the MS Windows platform, using freely available tools only. Here we use the Gtk+2 release. 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:

[01] the easiest part is to gather all the packages:
  • 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
    • atk & atk-dev
    • cairo & cairo-dev
    • gettext
    • glib & glib-dev
    • gtk+ & gtk+-dev
    • libiconv-bin
    • pango & pango-dev
    • pkg-config
    • zlib123-dll
  • GnuWin32 : separate GNU packages ported to MS Windows
    • jpeg-bin.zip & jpeg-lib.zip
    • tiff-bin.zip & tiff-lib.zip
    • libpng-bin & libpng-lib
    • zlib-bin & zlib-lib
  • XMedCon : get .tar.gz source package (>= 0.10.0)

<<Index | Top>>

[XX] Install MSYS/MingW environment + extras:

[02] install MingW => e:/mingw and unpack extras in here
[03] install MSYS => e:/msys (note: at postinstall, use UNIX style /-slashes for path to mingw)

[XX] Prepare MingW/MSYS environment:

[04] make a file $HOME/.profile and add the following lines: (using vi)
export PATH="/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"
[05] reopen any MingW/MSYS terminal windows to use the new environment variables
[06] make a directory /mingw/local
[07] unzip all GtkWin32 & GnuWin32 packages in the above directory (note: without CR/LF conversions)
[08] make a directory $HOME/build

<<Index | Top>>

[XX] Build (X)MedCon Project

[09] unpack source tarball in $HOME/build
[10] configure
$> export LDFLAGS="-Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc $LDFLAGS"
(note: extra linker flags for smooth DLL(1) creation)
$> ./configure --prefix=/mingw/local
[11] make & install
$> 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 compatible yet. Read through the entire MingW/MSYS faq on what to do afterwards. (note: .def file & import lib)

<<Index | Top>>

Page last modified on November 21, 2007, at 03:41 PM