[Mono-dev] Standard name for mcs

jmalcolm malcolm.justin at gmail.com
Sun Jun 27 21:20:38 EDT 2010


I think this is a fair question.  I am not sure the original poster deserved
so much grief.

I have certainly compiled C programs from source that were written more than
five or six years ago.  It does not seem implausible that I might try to
compile the original posters code a decade from now and that I might find
that 'gmcs' is indeed not available at that time.

The best current solution does seem to be to use a macro like CSC in the
build script and set it to 'gmcs' or 'dmcs' or whatever your code requires. 
At least then, when it someday fails to build, it will likely be as simple
as changing a single letter in the build script to make it build again.

Many people would love to write build scripts that do not fail in this way
however.  In that case, it might make sense to see if 'gmcs' is available
and, if it is not, to try 'whatever the latest C# compiler is' instead.  You
could also check to make sure that the answer was not 'mcs' I suppose.  That
would future proof the process.  As was noted on this thread, the C#
compilers seem to have pretty good backwards compatibility even though they
have poor forward compatibility.

I saw recently the Mono VB compiler author proudly explain that his compiler
would not have any of the multiple names issues that the C# compiler has. 
Apparently, he sees it as a problem.

It seems pretty standard to have a fixed compiler name and then test for
system capabilities in the build script rather than to hard-wire in a
specific compiler name that implies a bunch of capabilities.  I am not
really complaining about the C# situation in Mono but I see no reason to be
grumpy at those who wonder if there is another way.
-- 
View this message in context: http://mono.1490590.n4.nabble.com/Standard-name-for-mcs-tp2270120p2270398.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list