[Mono-devel-list] Compiling to DLLs and then statically linking them into a PE

Chris Seaton chris at chrisseaton.com
Sat Aug 30 17:42:43 EDT 2003


>From the FAQ:

----

Question 82: Is it possible to build a C# file to some sort of
intermediate format which can linked into a final module, like the
traditional .c -> .o -> .so path?

You can use: 

mcs /target:library file1.cs, mcs /target:library file2.cs, mcs
/target:exe file1.dll file2.dll /out:mybin.exe

----

In this example, if I have a class defined in file1 that file2 uses, and
another class defined in file2 that file1 uses, will the commands work,
or will the compiler fail?

To compile file1 the compiler would need the meta data from file2, I
would have thought.

I've run into this problem before, as I originally wanted to use make to
compile my C# programs.

-- 
Chris Seaton

chris at chrisseaton.com
http://www.chrisseaton.com/




More information about the Mono-devel-list mailing list