[Mono-list] Specifying assemblies on mcs command line

murban murban@houston.rr.com
Tue, 11 Jun 2002 17:15:53 -0500


 When specifying assemblies on the mcs command line, sometimes the ".dll" 
extension is required, and sometimes it is prohibited. I'm not saying that 
the rules are "wrong" -- I'm saying that they're not entirely intuitive and 
that they are not clearly stated in the manpage.

It's easiest to see the behavior with some examples. The examples assume that 
Qt.dll is found in /usr/local/lib:

> mcs -r Qt qhelloworld.cs

Works. /usr/local/lib is searched by default.

> mcs -r Qt.dll qhelloworld.cs

Fails. Specifying the actual filename isn't allowed.

> mcs -r /usr/local/lib/Qt qhelloworld.cs

Fails. There is no file named /usr/local/lib/Qt

> mcs -r /usr/local/lib/Qt.dll qhelloworld.cs

Works.

Once one understand the behavior, it seems "obvious." However, when I first 
used Mono and "mcs -L /usr/local/lib -r Qt.dll qhelloworld.cs" would not 
work, I assumed that the "-L" flag was broken and that it was necessary to 
pass the full path to the assembly. It took a long time before it dawned on 
me to try simply "mcs -r Qt qhelloworld.cs."