[Mono-list] compiling more than one file
chris at ion-dreams.com
Fri Dec 9 05:22:55 EST 2005
> >>I am quite a newbie and I have a problem.
> >>I am using mono on windows and I want to use XEmacs for
> >>What I don't get is, when I am creating a class in an exra file, I
> >>cannot use it in my main file.
> >>How can I tell the compiler, that it has to look in the
> other file for
> >>the class?
> >To compile 3 file (file1,file2,filn) into a single exe:
> >$ mcs -r:dlls file1.cs file2.cs filen.cs
> Hm, did not work. It says "error CS0006: Cannot find assembly 'dlls' "
-r is where one references the assemblies needed for the project. From the
mcs man page:
-r:ASSEMBLY1[,ASSEMBLY2], -r ASSEMBLY1[,ASSEMBLY2]
Reference the named assemblies. Use this to use classes from
the named assembly in your program.
The assembly will be loaded from either the system directory
where all the assemblies live, or from
the path explicitly given with the -L option.
So had you referenced the assembly System.Drawing.dll in your program
Then you would need to: mcs -r System.Drawing.dll file1.cs filen.cs
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Mono-list