[Mono-osx] Mono and Xcode

Gerry Shaw gerry_shaw at yahoo.com
Wed Jul 27 03:01:55 EDT 2005


Using Xcode and Mono
====================

by Gerry Shaw <gerry_shaw at yahoo.com>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: MonoXcode.zip
Type: application/zip
Size: 3153 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-osx/attachments/20050727/3cc94bd9/MonoXcode.zip
-------------- next part --------------

This is an attempt to get a working development environment on my  
iBook and
mono to edit and build C# programs.

I wanted an editor that would allow me to build my program and take me
directly to any errors or warnings that might appear by selecting a  
hot key
to jump to errors.

I tried getting this to work in TextMate but it didn't quite work.   
After
playing with Xcode I got something workable that I thought I would  
share.

I'm doing this with Xcode 2.1 with the C# Xcode templates installed  
from druware [1].

[1] http://www.druware.com/products/xcodetools.html


Getting Build to Work
---------------------

1. Start Xcode 2.1

2. File > New Project

     Select "External Build System" project type.

3. Copy contents of MonoXcode into project by dragging into Groups  
and Files panel

     Make sure to check the "Copy items into destination group's  
folder" check box.

4. Build the project

     Notice that you get an error, use Cmd = to jump directly to the  
error;

5. Fix the error and build again

     Notice you get a warning now.

6. Fix the warning and build again,

Success.


Getting Run to Work
-------------------

1. Right click on Targets in the Groups and Files panel and select  
Add > Custom Executable.

2. Click Choose button and select '/Library/Frameworks/Mono.framework/ 
Versions/Current/bin/mono'.

3. Change name of executable to your project name.

4. Add argument to pass to mono to be your application.exe.  I.e.,  
HelloWorld.exe

5. Change the working directory (General tab in Executable Settings)  
to be the Project directory.

6. Run the program using Cmd R.

Success.


Future Work
-----------

The xcodemcs bash script feels like a major hack to get around the  
fact that
Xcode needs warnings and errors in a exact syntax.  Getting rid of  
this would
be nice but I'm not sure how.

Ideally this project type could get added to a druware's Xcode Tools  
project.

Of course getting a debugger integrated would be simply amazing.

License
-------

Do what you want with it, feel free to credit me if you want.



More information about the Mono-osx mailing list