[Mono-list] Mono embedding issue

Massimiliano Mantione massi at ximian.com
Thu Oct 12 02:03:16 EDT 2006


On Wed, 2006-10-11 at 23:49 +0200, Andreas Färber wrote:
> So far I have only tried to compile Mono under Cygwin on Windows,  
> where I had instructions from the Wiki, including specific  
> instructions and a script for the dependencies; if anyone would tell  
> me how to go about it on OS X without ruining my existing Mono  
> installation I'd be willing to give it a try.

I have never used OS X, but the standard way of hacking Mono without
touching the official Mono installation is choosing a custom prefix.

I mean, you download the sources, and when running ./configure (or
./autogen.sh if you work from svn) specify the --prefix option.
The choice of prefix is arbitrary, as long as it does not overlap
the officially installed one. I prefer working with prefixes on my
own home (like "/home/massi/mono") so I never need root permissions
to install the custom mono, and therefore I have no chances to mess
things up.

Then, to use your custom Mono, set the following:

export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

The "PKG_CONFIG_PATH" thing is needed so that if you compile other
libraries/applications, their configure stage will see the new Mono
instead of the system provided one.
The idea is: if you run those three commands, you live in a world
where Mono is your hacked one, otherwise you live in the "default"
world.

Hope this helps,
  Massi




More information about the Mono-list mailing list