MonoDevelop on Mac OS X

These are rough notes, and due to the the moving target nature of everything, very likely to stop working at some point in the future.

  • Install Fink.
  • Configure Fink to use the unstable repository.
  • Install mono, gtk-sharp, gecko-sharp, gtksourceview-sharp, and probably a bunch of other stuff (monodevelop will let you know what’s needed when you run ./configure) using “fink install”. When you come to gtk-sharp, you might have a problem with a gtk+2 dependency, so if this happens, edit
    /sw/fink/10.3/unstable/main/finkinfo/graphics/gtk-sharp.info
    and change all occurrences of “gtk+2 (>= 2.2.4-3)” to “gtk+2 (>=2.2.4-2)”
  • Install mozilla with fink. This will take a veeeery long time if you do it from source, so if you don’t mind mixing source/binary
    installations, just do “sudo apt-get install mozilla”. If you don’t have mozilla installed, the monodevelop script will appear to hang (“cat `which mozilla`” turns into “cat”) when you launch it.
  • Download MonoDevelop 0.3, extract it, set CPPFLAGS=-I/sw/include, CFLAGS=-I/sw/include, and LDFLAGS=-L/sw/lib, and then run ./configure in the top-level directory.
  • Edit Main/Base/Makefile and change CSC = mcs /debug to CSC = mcs. This prevented a NullReferenceException while compiling that part of the code.
  • make and then sudo make install
  • Mono seems to be a little confused about how to handle DllImport on Mac OS X, so we need to help it. You’ll need to make the following
    symlinks:

    $ cd /sw/lib
    $ sudo ln -s libgtk-x11-2.0.dylib libgtk-x11-2.0.so.0
    $ sudo ln -s libgnomevfs-2.dylib libgnomevfs-2.so
    $ sudo ln -s libgtksourceview-1.0.dylib libgtksourceview-1.0.so
    $ sudo ln -s libglib-2.0.dylib libglib-2.0.so
    # Update 5/18/2004:
    $ sudo ln -s libglib-2.0.dylib libglib-2.0.so.0
    
    $ cd /usr/local/lib/monodevelop/bin/
    $ sudo ln -s libgdldock.dylib libgdldock.so
    $ sudo ln -s libmonodevelop.dylib libmonodevelop.so
  • Open up X11, start an xterm, and run /usr/local/bin/monodevelop.

I can’t make any promises that this will work, but it created the code completion database successfully, and so far, it’s working well for me.

This entry was posted in programming. Bookmark the permalink.

3 Responses to MonoDevelop on Mac OS X

  1. Andres says:

    This lines:
    set CPPFLAGS=-I/sw/include, CFLAGS=-I/sw/include, and LDFLAGS=-L/sw/lib

    Where will be executed?????

  2. Andres says:

    These lines:
    set CPPFLAGS=-I/sw/include
    CFLAGS=-I/sw/include, and LDFLAGS=-L/sw/lib

    Where should be executed?

  3. Brian Jepson says:

    Andres, those should be executed at the Terminal. These instructions are kind of out of date, so you should check with the MonoDevelop website to see if things have changed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>