Awesome, thank you. Yes, fixed by changing the compile line of the library to: gmcs /debug- /target:library AssemblyInfo.cs hello.cs /out:b.dll
~ Doug. On Mon, May 23, 2011 at 6:53 PM, Robert Jordan <[email protected]> wrote: > On 23.05.2011 08:58, Doug wrote: > > I'm having some trouble compiling a DLL and linking against it. > > > > Should be trivial, so I must be doing something wrong; I keep getting the > > error: > > ** (./a.out:27535): WARNING **: The class HelloLib.Hello could not be > > loaded, used in a, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null > > > > Unhandled Exception: System.TypeLoadException: Could not load type > > 'HelloLib.Hello' from assembly 'a, Version=1.0.0.0, Culture=neutral, > > PublicKeyToken=null'. > > > > > Compiles ok via: > > gmcs /debug- /target:library ./AssemblyInfo.cs ./hello.cs /out:a.dll > > > > > Compiles ok via: > > gmcs /debug+ /warn:4 /reference:./a.dll ./main.cs /out:a.out > > > > ... > > > > But when I run it I get: > > ** (./a.out:27535): WARNING **: The class HelloLib.Hello could not be > > loaded, used in a, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null > > > > Unhandled Exception: System.TypeLoadException: Could not load type > > 'HelloLib.Hello' from assembly 'a, Version=1.0.0.0, Culture=neutral, > > PublicKeyToken=null'. > > > > What am I doing wrong? > > > > Obviously this works fine: > > gmcs /debug+ /warn:4 ./hello.cs ./main.cs /out:a.out > > You are creating two assemblies with the same base name "a". > Mono does not support this. > > Robert > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list >
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
