Navit on Windows Progress on the win32 support will be documented on this page.
- 1 Download the binary distribution package of navit 0.0.4 release:
- 2 Compiling / debugging using CodeBlocks & mingw compiler
- 3 Compiling and running using cygwin
- 4 Compiling a native binary using mingw
- 5 Windows Mobile/Windows CE
The win32 binary distribution of Navit (release 0.0.4) can be downloaded from: navit link
please note that:
- Only GTK GUI/Graphics is supported (working on a native win32/gdi implementation, but this is not ready for prime time)
- Serial NMEA compatible GPS devices are supported
- MG map files work (tested with 2004 / 2005 map edition "Grosser Reiseplaner")
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:
- Glade/gtk+ toolkit for win32 from
- ming compiler from Website: mingw
SourceForgeDownload: MinGW (select Automated MinGW installer)
- CodeBlocks IDE from CodeBlocks download page (select recent development snapshot)
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)
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 :
- gcc (g++ too for sdl)
Prepare the build
Edit configure.in and add the following to CFLAGS at line 10:
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"
autogen.sh && ./configure
If you get :
checking for X... no
try adding the following parameters to ./configure :
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: http://email@example.com/msg16750.html
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 http://cygwin.com/licensing.html 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.
Windows Mobile/Windows CE
Compiling navit for wince using http://cegcc.sourceforge.net/. Download latest cegcc release and install it. Current installs in /opt/cegcc. Setup a cross-compile environment: Example setcegccenv.sh:
#! /bin/bash export PATH=$PATH:/opt/cegcc/bin/ export CEGCC_PATH=/opt/cegcc export WINCE_PATH=/opt/wince export PATH=$CEGCC_PATH/bin:$PATH export CPPFLAGS="-I$WINCE_PATH/include" export LDFLAGS="-L$WINCE_PATH/lib -L$CEGCC_PATH/lib" export LD_LIBRARY_PATH="$WINCE_PATH/bin" export PKG_CONFIG_PATH="$WINCE_PATH/lib/pkgconfig" export PKG_CONFIG_LIBDIR="$WINCE_PATH/lib/pkgconfig"
Then autogen.sh 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 \ --enable-avoid-float
This is basic just to view the maps. Then:
As usual, osm2navit.exe will fail to compile.
cd navit && make navit.exe
Once you have navit.exe ready, copy /opt/cegcc/arm-cegcc/lib/device/*.dll on you device:
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"
synce-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"
For a start best use the samplemap. Now you can launch navit.exe on the device.