GUPnP on Win32

Note: This page is not about compiling GPGMe on Windows. Instruction for this can be found in another blog post
As I stated earlier in GUPnP on win32 I’m currently porting the GUPnP stack to Windows. At first I tried an approach of developing on Linux, running autogen there and copying the whole tree to a Windows share, run ./configure and make there an see what breaks (or works)
After a while this gets quite annoying, so I tried to setup a complete build environment on Windows; you need:
Basic tools

  • You’ll need an editor, of course

Basic win32 build environment

  • mingw
  • msys

Install mingw and msys as advised on the mingw homepage.
Gtk/Gnome libs and build dependencies

Extract this anywhere you like, just make sure you can access it from your mingw environment (/opt/gtk e.g.). Navigate to /opt/gtk/share/icons, copy the gnome directory to higcolor. Change the theme name in file highcolor/index.theme to highcolor. Otherwise the gupnp-tools (mainly the two control points) will not work.
Chain up everything

  1. I decided to put all gupnp stuff in another directory (/opt/gupnp)
  2. Move the old libtool.m4 and ltdl.m4 out of the way (/share/aclocal)
  3. create /share/aclocal/dirlist and add /usr/local/aclocal as well as /opt/gtk/share/aclocal there
  4. For libtool to work properly you need a file command. There’s no need for a full-blown implementation. The fake file available at is sufficient.
  5. Create a .profilefile containing the following lines:
    export PKG_CONFIG_PATH=/opt/gtk/lib/pkgconfig:/opt/gupnp/lib/pkgconfig:$PKG_CONFIG_PATH
    export LD_LIBRARY_PATH=/opt/gtk/lib:/opt/gupnp/lib:$LD_LIBRARY_PATH
    export PATH=/opt/gtk/bin:/opt/gupnp/bin:$PATH
    export ACLOCAL_FLAGS="-I /opt/gtk/share/aclocal -I /opt/gupnp/share/aclocal"

Additional dependencies

Building the GUPnP stack
Some parts of GUPnP for windows currently only exists as git branches on github or gitorious. There is no release and no ready-to-build tarball of gupnp. So you will need a version of git for windows. I’m using msysgit (
For the steps now following make sure you’re not in a directory containing spaces. There seems to be a (minor) problem with autoconf if you do. So let’s get started. First package is easy:

  • libsoup: Download latest release from here: Just run ./configure –prefix /opt/gupnp.
  • gssdp: has windows support built-in since 0.10.0
  • gupnp: Windows support will be included in 0.19.2
  • gupnp-av: Latest release contains windows support
  • gupnp-tools: Latest release contains windows support


5 thoughts on “GUPnP on Win32

  1. Hi Jens,
    Thanks for this guide. Kindly tell which versions of libraries you used? Because I tried to follow above instructions and got compatibility problems with different libraries. Also how to solve problem of missing header files like “sys/utsname.h”?

  2. Sorry, that guide is a bit out-dated. Gssdp has windows support in the latest release and the gupnp version points to the wrong branch. It needs to be the win32 branch of course, that should solve the missing header files.
    Please note that the gupnp branch is somewhat behind master, I really need to update this.

  3. It’s worse even still. Microsoft has it’s own libraries for uPnP. I’m exploring them for info contributing to a solution.

  4. I would like to speak to the authors, regarding code. More than happy to contribute, but dead in the water if it’s ms code.

  5. @Greg: Not sure what you’re asking. The code is not from Microsoft but written from scratch using the available UPnP specs.

Comments are closed.