From Navit's Wiki
Revision as of 00:00, 15 January 2008 by Afaber (talk | contribs)
Jump to: navigation, search
Navit under Windows, GTK Gui, Dutch translation

Navit on Windows is still experimental at this moment (January 2007). Progress on the win32 support will be documented on this page.

Download (preliminary version) of the binary distribution package:

A preliminary win32 binary distribution of Navit can be downloaded from: navit link

please note that:

  • Only GTK GUI/Graphics is supported
  • No GPSD support, however, serial NMEA compatible GPS devices are supported
  • MG map files work (tested with 2004 / 2005 map edition "Grosser Reiseplaner"), target dialog crashes often and does not function as under Linux.

Compiling / debugging using CodeBlocks & mingw compiler

Win32 builds are currently supported using the CodeBlocks/mingw development environment, in combination with the glade for win32 GTK devlopment toolkit. The CodeBlocks project files have been added to cvs repository.


In order to compile the win32 version of Navit, you need the following software devlopment tools:


Install the packages mentioned above. After everything has been installed you can open the navit.workspace file in CodeBlocks:


  • Start the CodeBlocks application
  • Open the navit.workspace file (located in projs\CodeBlocks directory)
  • Set the GTK_DIR enviroment variable in CodeBlocks (Setting/Environment, and select environments variables)
  • the GTK_DIR should point to where you have installed the Glade/Gtk toolkit package (e.g. d:\gtk)

Now you should be able to build/debug the navit project

Running from debugger

In order to run navit from the CodeBlocks debugger, you have to:

  • Copy the navit.xml file from the source directory into the projs\CodeBlocks directory
  • Copy the xpm directory from the toplevel directory into the projs\CodeBlocks directory
  • Modify the navit.xml to set the map (currently only OSM binary files are supported)

Navigation device

Currently NMEA serial GPS receiver devices (USB/Bluetooth) are supported by the win32 port of navit. You can configure the device by adapting the navit.xml file in the projs\CodeBlocks directory. For example, a serial device on Com4 can be configured as follows

<vehicle name="GPSOnCom4" enabled="yes" active="1" source="file:COM4 baud=115200 parity=N data=8 stop=1" color="#0000ff"/>

Compiling and running using cygwin


You will probably need the following packages from cygwin :

  • automake
  • autoconf
  • gtk2-x11-devel
  • gcc (g++ too for sdl)
  • gettext-devel
  • diffutils
  • pkgconfig
  • xorg-x11-devel
  • glib2-devel
  • pango-devel
  • atk-devel
  • make


  • cvs

Prepare the build

Edit and add the following to CFLAGS at line 10:

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

It should look like this :

        CFLAGS="$CFLAGS -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include"

Now run && ./configure

If you get :

checking for X... no

try adding the following parameters to ./configure :

--x-libraries=/usr/X11R6/lib  --x-include=/usr/X11R6/includes

Build navit

Currently, building navit will fail at this point, because we haven't found an implementation of the wordexp function for cygwin.

Here's a message in that thread from an actual competent Cygwin user:

The implication of that is a "C library". A "C library" is an "implementation" of reusable code. It consists of a library file that contains the compiled object code and a header file with the matching declarations that goes along with it. The library is implemented as a static archive at build time and simply linked into the app binary. There's nothing to include in that case -- it's already in there.

Make a redistributable package

Please read and understand so that you don't infringe Cygwin's intellectual property rights (copyleft) when you distribute the package you've built.

Compiling a native binary using mingw

The main advantage of this method is that it will produce a redistributable binary.