[Mono-dev] Creating a dll

Martin Hinks mhinks at gmail.com
Mon Jul 3 06:42:20 EDT 2006


See http://www.codeguru.com/Csharp/.NET/cpp_managed/article.php/c4871/

Basically, managed code is standard C#/VB.NET/Any other .NET language code.
Unmanaged code is when you make a call to a dll or resource that was
not written in the .NET Framework. This essentially means it may be
operating system dependent etc.

On 7/3/06, Staffan Ström <s.staffan at gmail.com> wrote:
>
> I'm not sure what you mean by call that's managed/unmaged?
>
> / Staffan
>
>
>
> On 7/3/06, Martin Hinks <mhinks at gmail.com> wrote:
> > Does your library make native code calls or is it entirely managed?
> >
> > The error message you are receiving would appear to indicate that
> > somewhere in your assembly you make an unmanaged call that is throwing
> > the error...
> >
> > On 7/3/06, Staffan Ström <s.staffan at gmail.com> wrote:
> > >
> > > Hi all!
> > > Maybe a basic question, but I just do't get what's wrong.
> > >
> > > I'm creating a dll using gmcs (mono ver 1.1.13.8) and it's compiles ok
> and
> > > may dll-file is created. But when I'm trying to reference to that dll in
> > > another build gmcs craches with the following message:
> > >
> > > ***** Start of error message *****
> > >
> > >
> > >
> > >
> =================================================================
> > > Got a SIGSEGV while executing native code. This usually indicates
> > > a fatal error in the mono runtime or one of the native libraries
> > > used by your application.
> > >
> =================================================================
> > >
> > > Stacktrace:
> > >
> > > in (wrapper managed-to-native)
> > > System.Reflection.Assembly:LoadFrom (string,bool) <0x4>
> > > in (wrapper managed-to-native)
> > > System.Reflection.Assembly:LoadFrom (string,bool)
> > > <0xffffffe4>
> > > in System.Reflection.Assembly:LoadFrom (string) <0xc>
> > > in Mono.CSharp.Driver:LoadAssembly (string,string,bool) <0xb0>
> > > in Mono.CSharp.Driver:LoadAssembly (string,bool) <0x11>
> > > in Mono.CSharp.Driver:LoadReferences () <0x7d>
> > > in Mono.CSharp.Driver:MainDriver (string[]) <0x53f>
> > > in Mono.CSharp.Driver:Main (string[]) <0x51>
> > > in (wrapper runtime-invoke)
> > > System.Object:runtime_invoke_int_string []
> > > (object,intptr,intptr,intptr)
> > > <0xf063e2e>
> > >
> > > This application has requested the Runtime to terminate it in an unusual
> > > way.
> > > Please contact the application's support team for more information.
> > >
> > > ***** End of error message *****
> > >
> > >  If I'm trying to reference to the first dll in a MS Visual Studio
> project,
> > > it complains about the dll not being a valid assambly...
> > > If I use the same src-files in a MS Visual Studio project and creates a
> dll,
> > > it works fine (and may be referenced to in other builds)...
> > >
> > > Does anyone have an idea what I might be doing wrong?
> > >
> > > The command I use when creating the failing dll is:
> > >
> > > " gmcs.bat /nologo /debug- /optimize-
> > >
> /out:D:\etc\java\aten\NETC-framework\build\dist\dotnet\NETC-framework.dll
> > > /target:module /nostdlib- /warn:3
> > >
> /doc:D:\etc\java\aten\NETC-framework\build\dist\dotnet\NETC-framework_doc.xml
> > > /fullpaths /incremental-
> > >
> /reference:D:\libraries\assemblies\external\Rhino.Mocks.dll;D:\libraries\assemblies\external\Hessiancsharp.dll;d:\libraries\assemblies\external\nunit.framework.dll
> > > .\*.cs .\exception\*.cs .\to\*.cs .\to\generic\*.cs"
> > >
> > > Brgds Staffan
> > >
> > >
> > >
> > > _______________________________________________
> > > Mono-devel-list mailing list
> > > Mono-devel-list at lists.ximian.com
> > >
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> > >
> > >
> > >
> >
> >
> > --
> > Martin Hinks
> > http://www.m-s-d.net
> >
>
>


-- 
Martin Hinks
http://www.m-s-d.net



More information about the Mono-devel-list mailing list