Salient Solutions

wrasslin ones and nones for fun and profit - Sky Sanders' Blog
Get your own ranked flair here
posts - 88, comments - 54, trackbacks - 0

Building Mono C# compiler (MCS) in Visual Studio 2008

If you are an old hand at building Mono on Windows using cygwin, then this post will not be of interest.

The target audience for this post are those who just wish to build MCS, GMCS etc in Visual Studio 2008 without the need for MCS.

Building the Mono C# compiler in Visual Studio 2008 would be as simple as opening gmcs.sln in VS and building if not for the need to generate the cs-parser.cs file.

Supplied in the MCS package in the latest stable, 2.6.1,  is cs-parser.jay, which is an input file for the Jay Parser Generator for C#. The C++ source and gnu makefile for Jay are included but the point of this post is to obviate the need to use cygwin, so you can download a precompiled exe from the previous link.

The simplest way to generate your cs-parser.cs file is to copy cs-parser.jay to the Jay directory (to make use of the skeleton file) and run the following command line in the Jay directory:

jay.exe -ctv cs-parser.jay <skeleton.cs >cs-parser.cs

Now, in the compiler solution, delete the missing cs-parser.cs file and paste the freshly generate cs-parser.cs into the solution.

Or just download cs-parser.cs (2.6.1) here.

Now clean and rebuild.

Fini.

 


Technorati tags: ,

Print | posted on Tuesday, March 09, 2010 1:09 AM | Filed Under [ CodeProject-Tip ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 5 and 3 and type the answer here:

Powered by: