From Navit's Wiki
Revision as of 20:02, 21 April 2010 by Woglinde (talk | contribs)
Jump to: navigation, search
Navit under Windows, GTK Gui, Dutch translation

Navit on Windows Progress on the win32 support will be documented on this page.

Download the binary distribution package of Navit

The Win32 binary distribution of Navit can be downloaded via the Download Navit page, or download the Win32 bleeding edge compiled daily from SVN.

The WinCE binary distribution of Navit can be downloaded via the Download Navit page, or download the WinCE bleeding edge compiled daily from SVN.

Tips and Tricks

Compiling, configuring and running Navit on Windows can be a challenge at times. Below are a few hints, in addition to the more detailed instructions following.

  • It is best not to use the “win32” GUI (ie <gui type="win32" />) as this is no longer being supported. It is advisable to use the “internal” GUI (<gui type="internal" />) instead.
  • Up to and including Navit release 0.0.4 NMEA serial GPS receiver devices (USB/Bluetooth) were supported by the win32 port. Due to code changes Navit releases 0.1.0 and 0.1.1 have yet to re-support this functionality (refer to for an interim patch). You can configure the device by adapting the navit.xml file (specifically, the "source" attribute in the "vehicle" tag). For example, a serial device on Com4 can be configured for navit release 0.0.4 as follows:
 <vehicle name="GPSOnCom4" enabled="yes" active="1" source="file:COM4 baud=115200 parity=N data=8 stop=1" color="#0000ff"/>

Compiling / debugging using CodeBlocks & mingw compiler

Up to and including release 0.0.4 the Win32 builds were 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. For release 0.1.0 and later use native mingw (see below) or cygwin (see below).


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

  • Glade/gtk+ toolkit for win32 from

Glade 3.43 / Gtk 2.12.9

link ??broken?? Gtk+ 2.10.11

SourceForgeDownload: Gtk+ 2.10.11

SourceForgeDownload: MinGW (select Automated MinGW installer)

SourceForgeDownload: CodeBlocks


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:


ZLIB -lzdll message Settings> Compiler and Debugger..> Global compiler settings In the Linker settings TAB (Add) C:\MinGW\lib\libzdll.a

SAPI You need to download and install the Microsoft Speech SDK 5.1 for this project to build.

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)

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
  • libtool
  • 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.


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

Probably the easiest way to obtain and install all the MSYS packages is to follow the instructions here

For speech support, one option is to use the "cmdline" speech type (refer to Configuring Navit) and a utility such as a Windows port of Say

Windows Mobile/Windows CE

You can download now cab or zip file for Windows Mobile and WindowsCE! Highest number is the newest version of NavIt.

Download it and save on your Storage Card. Install it.

Now you have NavIt on your PDA or Mobile Phone.

This is a manual for self compiling (navit.exe)

You need to have a Linux (like Ubuntu). If you didn´t have Linux, start your Linux on Live-CD.

Compiling navit for wince using Download latest cegcc release and install it.

In November 2009 versions compiled using arm-cegcc-gcc (both revision 1214 and release 0.59.1) had problems (threw exception_datatype_misalignment and caused access violations).
Using the variant arm-mingw32ce of CeGCC 0.59.1 it was possible to build a working executable which can be debugged (see Compiling Navit for WinCE/WinMobile).

Source cegcc-arm and mingw (TODO dead link)

Current installs in /opt/cegcc. Setup a cross-compile environment:


#! /bin/bash
export PATH=$PATH:/opt/cegcc/bin/
export CEGCC_PATH=/opt/cegcc
export WINCE_PATH=/opt/wince
export CPPFLAGS="-I$WINCE_PATH/include"
export PKG_CONFIG_PATH="$WINCE_PATH/lib/pkgconfig"
export PKG_CONFIG_LIBDIR="$WINCE_PATH/lib/pkgconfig"

For installation, compiling and configuring please see manual for NavIt on Linux.

Then and configure navit. Example configure for wince:

./configure \
RANLIB=arm-cegcc-ranlib \
CXX=arm-cegcc-g++ \
CC=arm-cegcc-gcc \
--host=arm-pe-wince \
--disable-readline \
--disable-dynamic-extensions \
--disable-largefile \
--enable-tempstore \
CFLAGS="-I/opt/wince/include -mwin32 -DWIN32 -D_WIN32_WCE=0x0400 -D_WIN32_IE=0x0400 -Wl,--enable-auto-import" \
LDFLAGS="-L/opt/wince/lib" \
--prefix=/opt/wince/  \
WINDRES=arm-cegcc-windres \
--disable-vehicle-demo \
--disable-vehicle-file \
--disable-speech-cmdline \
--disable-speech-speech-dispatcher  \
--disable-postgresql \
--disable-plugins \
--prefix=/opt/wince \
--disable-graphics-qt-qpainter \
--disable-gui-sdl  \
--disable-samplemap \
--disable-gui-gtk \
--disable-gui-internal \
--disable-vehicle-gypsy \
--disable-vehicle-file \
--disable-vehicle-demo  \
--disable-binding-dbus \
--enable-avoid-unaligned \

If example did not run, do this:

./configure \
 RANLIB=arm-mingw32ce-ranlib \
 CXX=arm-mingw32ce-g++ \
 CC=arm-mingw32ce-gcc \
 --host=arm-pe-wince \
 --disable-readline \
 --disable-dynamic-extensions \
 --disable-largefile \
 --enable-tempstore ¸\
 CFLAGS="-mwin32 -DWIN32 -D_WIN32_WCE=0x0400 -D_WIN32_IE=0x0400 -Wl,\
 --enable-auto-import" WINDRES=arm-mingw32ce-windres \
 --disable-vehicle-demo  \
 --disable-vehicle-file \
 --disable-speech-cmdline \
 --disable-speech-speech-dispatcher  \
 --disable-postgresql  \
 --disable-plugins \
 --prefix=/opt/wince \
 --disable-graphics-qt-qpainter \
 --disable-gui-sdl  \
 --disable-samplemap \
 --disable-gui-gtk \
 --disable-gui-internal \
 --disable-vehicle-gypsy \
 --disable-vehicle-file \
 --disable-vehicle-demo \
 --disable-binding-dbus \
 --enable-avoid-unaligned \
 --enable-avoid-float \
 --enable-support-libc \

This is basic just to view the maps. Then:


As usual, osm2navit.exe will fail to compile.

cd navit && make navit.exe

You find navit.exe under (your directory)/navit/navit/navit.exe

Install sync on your system.

For installation you need packages librapi, liprapi2, pyrapi2, libsync. Package synce-0.9.0-1 contains librapi and libsync. You do not need to install it again!


Sync If link is crashed, use this: Sync Link2

libsync: libsync

pyrapi2: pyrapi2

librapi2 librapi2

Once you have navit.exe ready, copy /opt/cegcc/arm-cegcc/lib/device/*.dll on your device.

For Debian use:

synce-pcp /opt/cegcc/arm-cegcc/lib/device/cegcc.dll ":/windows/cegcc.dll"
synce-pcp /opt/cegcc/arm-cegcc/lib/device/cegccthrd.dll ":/windows/cegccthrd.dll"

All other Linux/Unix systems use:

pcp /opt/cegcc/arm-cegcc/lib/device/cegcc.dll ":/windows/cegcc.dll"
pcp /opt/cegcc/arm-cegcc/lib/device/cegccthrd.dll ":/windows/cegccthrd.dll"

Synchronisation with a grahic surface, if connection to device failed:

Packages RAKI and RAPIP you can use.

RAKI you have in packages synce-kde (see Synce).

RAKI is like Active Sync, RAPIP is a little bit like fish:// under Konquerror.

Under SuSE Linux you can run kitchensync (not for all PDA).

For synchronisation you can also use kpilot under Suse Linux (runs not with all PDA) or Microsoft Active Sync under Windows (free download at Microsoft homepage).

You can put your memory card in card reader and copy data. Over console you must type in


before you remove memory card.

Install navit.exe.


synce-pcp navit.exe ":/Storage Card/navit.exe"

All other:

pcp navit.exe ":/Storage Card/navit.exe"

Prepare a navit.xml.wince

Change gui to win32 and graphics to win32.

Fix the paths to your maps "/Storage Card/binfilemap.bin"


synce-pcp binfilemap.bin ":/Storage Card/binfilemap.bin"
synce-pcp navit.xml.wince ":/Storage Card/navit.xml"

All other:

pcp binfilemap.bin ":/Storage Card/binfilemap.bin"
pcp navit.xml.wince ":/Storage Card/navit.xml"

For a start best use the samplemap. Now you can launch navit.exe on the device.