Difference between revisions of "MacOS development"

From Navit's Wiki
Jump to: navigation, search
(GTK Gui)
(GTK Gui)
Line 8: Line 8:
  
 
==GTK Gui==
 
==GTK Gui==
You should only need automake, gtk2 and glib2 via macPorts ( http://www.macports.org/ )
+
You should only need automake, gpsd, gtk2 and glib2 via macPorts ( http://www.macports.org/ )
  
 
MacPorts developers suggest to install Xcode Tools from http://developer.apple.com/tools/xcode/ and not from the Mac OSX install disk.
 
MacPorts developers suggest to install Xcode Tools from http://developer.apple.com/tools/xcode/ and not from the Mac OSX install disk.

Revision as of 18:41, 11 November 2007

Here are some notes about running navit under MacOS. This is a draft, feel free to improve it.


What you will need

It's recommended to use the cvs version instead of release 0.0.1, since we added a few fix for this platform.

GTK Gui

You should only need automake, gpsd, gtk2 and glib2 via macPorts ( http://www.macports.org/ )

MacPorts developers suggest to install Xcode Tools from http://developer.apple.com/tools/xcode/ and not from the Mac OSX install disk.

Make sure you don't have fink installed on your system, it can confuse MacPorts package building and installation.

If you want to install navit along the MacPorts packages, you need to use the /opt/local directory as prefix:

 ./autogen.sh && ./configure --prefix=/opt/local

SDL Gui

Untested yet.

Something went wrong?

Libtool error :

If you try to compile navit-0.0.1, you might get the following bug (which is fixed in cvs).

/usr/bin/libtool: internal link edit command failed
make[4]: *** [libdata_mg.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1

The fix is in debug.h to replace

int debug_level;

with

extern int debug_level;

This should be fixed now in CVS.


Malloc error :

param.c:3:20: error: malloc.h: No such file or directory
param.c: In function 'param_add_string':
param.c:10: warning: implicit declaration of function 'malloc'
param.c:10: warning: incompatible implicit declaration of built-in function 'malloc'

There is no malloc.h in OS X. All the defs are in stdlib.h. If you want you could make a softlink /usr/local/inlcude/malloc.h to /usr/include/stdlib.h, or just comment the relevants include <malloc.h>

Both will work. The symlink is maybe easier for now.

We'll add a platform-test soon to fix it.