[Mono-list] Compile error - cannot find type 'Form'
Jonathan Pryor
jonpryor@vt.edu
10 Jan 2003 12:20:05 -0500
What's your command line? Are you including the reference to
System.Windows.Forms?
For example, this would be an appropriate command line:
mcs swftest.cs -r:System.Windows.Forms.dll
Your compiles for me with this command line, though I'm using CVS, not
mono-0.17.
However, *running* swftest.exe is a different problem. When I run
swftest.exe, I get the output:
wine client error:(nil): sendmsg: Bad file descriptor
I don't think System.Windows.Forms works under Linux right now.
- Jon
On Fri, 2003-01-10 at 11:45, Andy Levine wrote:
> I just installed mono 0.17 from the RPMs (mono and mono-devel) on RH
> 7.1. I can successfully compile and run console applications, but any
> class I try to compile that uses System.Windows.Forms gives me the
> following error:
>
> SimpleHelloWorld.cs(15) error CS0246: Cannot find type `Form'
> Compilation failed: 1 error(s), 0 warnings
>
> I have the simplest of classes (actually sample code form the .NET SDK),
> shown below:
> -----------------------------------------------------------------
> using System;
> using System.Windows.Forms;
>
> public class SimpleHelloWorld : Form {
> [STAThread]
> public static int Main(string[] args) {
> Application.Run(new SimpleHelloWorld());
> return 0;
> }
>
> public SimpleHelloWorld() {
> this.Text = "Hello World";
> }
> }
> -------------------------------------------------------------------
> I think I have everything I need. I found System.Windows.Forms.dll in
> /usr/lib. I even ildasm'ed it from my Windows box and found all the
> classes in there (including Form).
>
> Any hints?
>
> Thanks
> Andy
>
>
> _______________________________________________
> Mono-list maillist - Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list