<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.met.no/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>wiki.met.no diana:windows:building</title>
        <description></description>
        <link>https://wiki.met.no/</link>
        <lastBuildDate>Mon, 27 Apr 2026 19:38:21 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://wiki.met.no/lib/tpl/bootstrap3/images/favicon.ico</url>
            <title>wiki.met.no</title>
            <link>https://wiki.met.no/</link>
        </image>
        <item>
            <title>Installing the GNU autotools on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/autotools?rev=1653989371</link>
            <description>Installing the GNU autotools on Windows

Perl

The GNU autotools require Perl.  Download and install the MSYS version of Perl from &lt;http://sourceforge.net/projects/mingw/files/MSYS%20perl/&gt;.  You will also need libcrypt from &lt;http://sourceforge.net/projects/mingw/files/MSYS%20crypt/&gt;.

You must use the MSYS version.  You can not use ActiveState Perl or similar for this, because it interprets paths differently.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building the Boost libraries on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/boost?rev=1653989371</link>
            <description>Building the Boost libraries on Windows

Boost jam

This utility is used to compile the Boost libraries.

Get the source tarball from &lt;http://downloads.sourceforge.net/project/boost/boost-jam/3.1.17/boost-jam-3.1.17.tgz&gt;; once you have it, it's a simple matter of running the build script (which will automatically detect MinGW) and installing the resulting executable:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building zlib and bzip2 on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/compress?rev=1653989371</link>
            <description>Building zlib and bzip2 on Windows

Download and extract the correct versions of zlib and bzip2:
 Package    Location                                        Version  zlib       &lt;http://sourceforge.net/projects/libpng/files/&gt;   1.2.3    bzip2      &lt;http://www.bzip.org/downloads.html&gt;              1.0.5   
To build zlib, run the following commands after extracting the source code:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building Diana on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/diana?rev=1653989371</link>
            <description>Building Diana on Windows

First, check out the source code using your favorite Subversion client (I recommend TortoiseSVN).

We also need to specify where Qt is to be found (normally C:/Qt/x.y.z where x.y.z is the version number, e.g. 4.4.0).

Of course, we also need to point</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Setting up the build environment on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/environment?rev=1653989371</link>
            <description>Setting up the build environment on Windows

Assuming Windows XP 32.  We will use MinGW to build the libraries and application and MSYS as a working environment.

The distinction between MinGW and MSYS is very important: MinGW is a set of compilers and libraries you use to build Windows applications, while MSYS is an emulated GNU environment similar to (and, in fact, based on) Cygwin.  You can</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building FFmpeg on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/ffmpeg?rev=1653989371</link>
            <description>Building FFmpeg on Windows

First, get the latest source from &lt;http://www.ffmpeg.org/download.html&gt; and extract it in a convenient place, then configure it:
$ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include \
  ./configure --prefix=/c/met.no \
  --disable-ffmpeg --disable-ffplay --disable-ffserver \
  --enable-memalign-hack</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building FreeType 2 on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/ftgl?rev=1653989371</link>
            <description>Building FreeType 2 on Windows

First, get the latest source from &lt;http://freetype.sourceforge.net/download.html#stable&gt; and extract it in a convenient place, then configure, build and install it:
$ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no --disable-shared
$ make all install
$ cp README /c/met.no/copyright/freetype2.txt
$ cat docs/LICENSE.TXT &gt;&gt;/c/met.no/copyright/freetype2.txt
$ cat docs/FTL.TXT &gt;&gt;/c/met.no/copyright/freetype2.txt
$ cat docs/GPL.TXT &gt;&gt;…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building JasPer and the Grib API on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/grib?rev=1653989371</link>
            <description>Building JasPer and the Grib API on Windows

XXX is JasPer really required? lisbethb, audunc say probably not.

JasPer

JasPer is an obnoxious little piece of software that should be avoided at all costs, but Grib uses it, so we're stuck with it.

Download the latest source (currently 1.900.1) from</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building NetCDF, HDF4 and HDF5 on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/hdf?rev=1653989371</link>
            <description>Building NetCDF, HDF4 and HDF5 on Windows

There are binaries available, and they're probably fine, but the headers are not, because HDF4 / HDF5 install different headers depending on which compiler they were built with (which in itself is a bug).  Luckily, building them from source is fairly easy.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building HDF4 on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/hdf4?rev=1653989371</link>
            <description>Building HDF4 on Windows

Moved from hdf, doesn't work due to XDR-related bugs in HDF4's build system.  This is fixable, but not trivially.

HDF4

First, get the latest source (currently 4.2r4) from &lt;http://www.hdfgroup.org/release4/obtain.html&gt; and extract it in a convenient place.

HDF4's autoconf infrastructure is a weird mix of too-old and too-new.  Open</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building libpng, libjpeg and libtiff on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/image?rev=1653989371</link>
            <description>Building libpng, libjpeg and libtiff on Windows

Download and extract the correct versions of zlib, libpng, jpeg and tiff:
 Package    Location                                        Version  libpng     &lt;http://sourceforge.net/projects/libpng/files/&gt;   1.2.40   jpeg       &lt;http://www.ijg.org/files/&gt;                       8</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Unresolved issues</title>
            <link>https://wiki.met.no/diana/windows/building/issues?rev=1653989371</link>
            <description>Unresolved issues

OUT OF DATE most of these issues have been resolved or worked around, or were only relevant in the initial, experimental phase.

--prefix

You'll notice that I recommend installing several components (HDF, NetCDF, Grib...) in their own directories under</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building metlibs on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/metlibs?rev=1653989371</link>
            <description>Building metlibs on Windows

First, check out the source code using your favorite Subversion client (I recommend TortoiseSVN).

We won't build shared libraries.  They're a huge pain to manage on Windows, and we don't really need them.

Since we currently don't have working HDF4 and MySQL libraries, we have to disable everything that uses those directly or indirectly:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building MySQL on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/mysql?rev=1653989371</link>
            <description>Building MySQL on Windows

CMake

&lt;http://www.cmake.org/cmake/resources/software.html&gt;
$ ./configure --prefix=/mingw
$ make
$ make install
MySQL

&lt;http://dev.mysql.com/downloads/connector/c/&gt;

Download the noinstall zip file (e.g. mysql-connector-c-noinstall-6.0.2-win32.zip) and extract it into C:\Program Files\libmysql (so you should have C:\Program Files\libmysql\include</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Packaging Diana</title>
            <link>https://wiki.met.no/diana/windows/building/packaging?rev=1653989371</link>
            <description>Packaging Diana

This assumes you've completed the previous steps exactly as described.

TODO: update for dynamic libpq / libavformat

The stupid way

Create the installation tree

Create a scratch directory (e.g. C:\dianainst).  In the Diana source directory, run the following command to install Diana into that directory:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building PROJ on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/proj?rev=1653989371</link>
            <description>Building PROJ on Windows

First, get the latest source (currently 4.7.0) from &lt;http://trac.osgeo.org/proj/&gt; and extract it in a convenient place.

4.7.0 added support for Windows native threads, but it doesn't work properly: you can either leave threads enabled (the default), in which case it tries to compile in support for</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Installing Qt on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/qt?rev=1653989371</link>
            <description>Installing Qt on Windows

Download the sources from &lt;http://qt.nokia.com/downloads&gt; (choose “LGPL” and “Framework Only”) and run the installer.  Accept the default answer to every question and ignore the warning about using the wrong MinGW version (the one Qt wants to use is prehistoric and completely unusable).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building the Shapefile library on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/shapefile?rev=1653989371</link>
            <description>Building the Shapefile library on Windows

First, get the latest source from &lt;http://download.osgeo.org/shapelib&gt; and extract it in a convenient place.

This library does not have a build system to speak of.  The Makefile is so broken it's not even funny.  Let's fix it.  First, delete the</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building the MySQL and PostgreSQL libraries on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/sql?rev=1653989371</link>
            <description>Building the MySQL and PostgreSQL libraries on Windows

MySQL

MySQL does not support gcc on Windows, only MSVC.  Moved to a separate page.

PostgreSQL

Both the C and C++ interfaces build fine “out of the box” (except for the LDFLAGS issue mentioned below) when building shared libraries.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Building UDUNITS on Windows</title>
            <link>https://wiki.met.no/diana/windows/building/udunits?rev=1653989371</link>
            <description>Building UDUNITS on Windows

Diana / metlibs use the old, unsupported UDUNITS library, not the new UDUNITS-2 library.  Unfortunately, converting from one to the other is not trivial, so we're stuck with the old library&amp;mdash;for now.

First, get the latest source (1.12.9) from</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
        <item>
            <title>Understanding MSYS / MinGW</title>
            <link>https://wiki.met.no/diana/windows/building/understanding?rev=1653989371</link>
            <description>Understanding MSYS / MinGW

MinGW is a port of GCC and the GNU binutils that produces native Win32 binaries.

MSYS is a set of libraries and tools which emulate a Unix-like environment on Win32.  MSYS tools are linked with a library that emulates a number of POSIX library calls which do not exist in the Win32</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
        <category>diana:windows:building</category>
            <pubDate>Tue, 31 May 2022 09:29:31 +0000</pubDate>
        </item>
    </channel>
</rss>
