dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU] System.Windows.Forms question


From: Stephen Compall
Subject: Re: [DotGNU] System.Windows.Forms question
Date: Mon, 02 May 2005 23:59:26 -0500

On Mon, 2005-05-02 at 21:25 -0700, Duck Grossberg wrote:
> using System;
> using System.Windows.Forms;
> using System.Drawing;
> class Welcome4
> {
>         static void Main( string[] args )
>         {
>                 MessageBox.Show( "Welcome\nto\nC#\nprogramming!" );
>         }
> }
> 
> Ducks-Computer:~ duck$ cscc -o example.exe example.cs
> example.cs:8: `MessageBox' is not declared in the current scope
> example.cs:8: called object is not a method or delegate

If you want stuff outside mscorlib (in this case you want
System.Windows.Forms.dll), you have to add those libraries with -l.  In
this case, there is a convenience option -winforms that will add the -l
options for you.  e.g. cscc -winforms -o example.exe example.cs

> If this is the inappropriate forum for asking these types of
> elementary questions, a point in the right direction would be
> appreciated.

It's fine AFAIK, but you may prefer joining #dotgnu on irc.freenode.net.

-- 
Stephen Compall

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]