[Mono-list] linkage question

Robert Jordan robertj at gmx.net
Fri Feb 6 12:46:18 EST 2009


Ryan Heaton wrote:
> Thanks to everybody who replied.  My problem turned out to be solved
> by Robert's suggestion: I had to rename my executable from full.exe to
> fulltest.exe or something.
> However, I'm still not clear as to how Mono resolves references to
> other libraries.  It's clear that it loads all libraries that are in
> the same directory as the executable.  But does that mean that for any

This is correct.

> given executable, all libraries have to be in the same directory? Is
> there no way to link libraries that are in a different directory?

If the APIs exposed by the assemblies are stable, the GAC could be
used for sharing them among applications. Otherwise there is
no straightforward (see man mono) way to influence the load path.

> Just FYI, I'm coming from a Java background, so I'm used to classpath
> arguments on the command line...

Well, .NET has a precise distinction between stable assembly/APIs and
local or unstable assemblies. So everything not being "stable" must be
local. This kind of loader behavior was introduced to avoid a condition
known as DLL hell, the sister of the CLASSPATH disease ;-)


More information about the Mono-list mailing list