<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tapping the Mono C# compiler (mcs) [cont&#039;d]</title>
	<atom:link href="http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/</link>
	<description>Life in Technicolor.</description>
	<lastBuildDate>Mon, 06 Sep 2010 04:14:26 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stephan</title>
		<link>http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/comment-page-1/#comment-16</link>
		<dc:creator>Stephan</dc:creator>
		<pubDate>Mon, 20 Aug 2007 12:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/#comment-16</guid>
		<description>Sorry for my late answer :( I was on vacation for a week 8)

Unfortunately I&#039;ve never tested &lt;strong&gt;compiling&lt;/strong&gt; code with generics in &lt;code&gt;gmcs&lt;/code&gt; &#039;cause I need only the C# &lt;strong&gt;parser&lt;/strong&gt; of the Mono project. In my scenario I compiled &lt;code&gt;gmcs&lt;/code&gt; as a Class Library which is in turn integrated in my application (a Static Source Code Analyzer) - this works without problems!

Hmm. Does your &lt;code&gt;gmcs&lt;/code&gt; use the proper references or assemblies e.g. for the type &lt;code&gt;List&lt;/code&gt;?</description>
		<content:encoded><![CDATA[<p>Sorry for my late answer <img src='http://www.arlt.eu/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I was on vacation for a week <img src='http://www.arlt.eu/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<p>Unfortunately I&#8217;ve never tested <strong>compiling</strong> code with generics in <code>gmcs</code> &#8217;cause I need only the C# <strong>parser</strong> of the Mono project. In my scenario I compiled <code>gmcs</code> as a Class Library which is in turn integrated in my application (a Static Source Code Analyzer) &#8211; this works without problems!</p>
<p>Hmm. Does your <code>gmcs</code> use the proper references or assemblies e.g. for the type <code>List</code>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Sink</title>
		<link>http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/comment-page-1/#comment-13</link>
		<dc:creator>Eric Sink</dc:creator>
		<pubDate>Tue, 14 Aug 2007 14:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.arlt.eu/blog/2007/07/27/tapping-the-mono-cs-compiler-mcs-continued/#comment-13</guid>
		<description>When I follow these steps, the resulting gmcs doesn&#039;t seem to know how to do generics.  Are you getting results like the ones below?

I tried compiling this:

&lt;pre lang=&quot;csharp&quot; line=&quot;1&quot;&gt;
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            List foo = new List();
            foo.Add(&quot;Hello&quot;);
            foo.Add(&quot;World&quot;);

            foreach (string s in foo)
            {
                Console.WriteLine(s);
            }
        }
    }
}
&lt;/pre&gt;

And I get this:

&lt;pre lang=&quot;text&quot;&gt;
Program.cs(12,17): error CS1502: The best overloaded method match for
`System.Collections.Generic.List.Add(T)&#039; has some invalid arguments
Program.cs(12,17): error CS1503: Argument 1: Cannot convert from `string&#039; to `T&#039;
Program.cs(13,17): error CS1502: The best overloaded method match for
`System.Collections.Generic.List.Add(T)&#039; has some invalid arguments
Program.cs(13,17): error CS1503: Argument 1: Cannot convert from `string&#039; to `T&#039;
Program.cs(15,13): error CS0030: Cannot convert type
`System.Collections.Generic.List.Enumerator.Current&#039; to `string&#039;
Compilation failed: 5 error(s), 0 warnings
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>When I follow these steps, the resulting gmcs doesn&#8217;t seem to know how to do generics.  Are you getting results like the ones below?</p>
<p>I tried compiling this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> ConsoleApplication1
<span style="color: #000000;">&#123;</span>
    <span style="color: #FF0000;">class</span> Program
    <span style="color: #000000;">&#123;</span>
        <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> Main<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> args<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            List foo <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            foo.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Hello&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            foo.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;World&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> s <span style="color: #0600FF;">in</span> foo<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>s<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>And I get this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Program.cs(12,17): error CS1502: The best overloaded method match for
`System.Collections.Generic.List.Add(T)' has some invalid arguments
Program.cs(12,17): error CS1503: Argument 1: Cannot convert from `string' to `T'
Program.cs(13,17): error CS1502: The best overloaded method match for
`System.Collections.Generic.List.Add(T)' has some invalid arguments
Program.cs(13,17): error CS1503: Argument 1: Cannot convert from `string' to `T'
Program.cs(15,13): error CS0030: Cannot convert type
`System.Collections.Generic.List.Enumerator.Current' to `string'
Compilation failed: 5 error(s), 0 warnings</pre></div></div>

]]></content:encoded>
	</item>
</channel>
</rss>
