[Mono-list] How to use the Generic?

Julien Sobrier julien at sobrier.net
Mon Jan 30 22:48:46 EST 2006


Hello,
I need to use a Generic in my project. I saw that it is supported by
gmcs.exe. But gmcs.exe seems to be linked to Mono 2.0.

I use mono 1.1.13.

I built my source code using Mono 1.0. It compiles fine with mcs.exe.
But not with gmcs.exe:

** (/usr/lib/mono/2.0/gmcs.exe:3946): WARNING **: The class
System.Reflection.Emit.GenericTypeParameterBuilder could not be loaded,
used in mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

=================================================================
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 <0xffffffff> Mono.CSharp.RootContext:Reset ()
in <0x17> Mono.CSharp.RootContext:Reset ()
in <0x33> Mono.CSharp.RootContext:.cctor ()
in <0x715cb7f> (wrapper runtime-invoke)
System.Object:runtime_invoke_void (object,intptr,intptr,intptr)
in <0xffffffff> Mono.CSharp.Driver:Main (string[])
in <0x10> Mono.CSharp.Driver:Main (string[])
in <0x715ebfa> (wrapper runtime-invoke)
System.Object:runtime_invoke_int_string[] (object,intptr,intptr,intptr)

Native stacktrace:

        /usr/bin/mono(mono_handle_native_sigsegv+0xba) [0x812c6f7]
        /usr/bin/mono [0x80fc7c7]
        [0x7db440]
        /usr/bin/mono(mono_class_from_mono_type+0xb) [0x8094312]
        /usr/bin/mono [0x80b1d89]
        /usr/bin/mono(mono_metadata_parse_type_full+0x11e) [0x80b20f4]
        /usr/bin/mono [0x809399f]
        /usr/bin/mono(mono_class_init+0x357) [0x8091d25]
        /usr/bin/mono(mono_class_init+0x4fa) [0x8091ec8]
        /usr/bin/mono [0x810589b]
        /usr/bin/mono [0x81163bf]
        /usr/bin/mono [0x8117d20]
        /usr/bin/mono(mono_magic_trampoline+0x14) [0x812d824]
        [0x838032]
        [0xf5f18c]
        [0xf5991e]
        /usr/bin/mono(mono_runtime_class_init+0x10c) [0x80b6478]
        /usr/bin/mono(mono_class_init_trampoline+0x19) [0x812db5d]
        [0x838242]
        [0xf59874]
        /usr/bin/mono(mono_runtime_exec_main+0x94) [0x80b8443]
        /usr/bin/mono(mono_runtime_run_main+0x166) [0x80ba9ba]
        /usr/bin/mono(mono_main+0x826) [0x805d2a2]
        /lib/libc.so.6(__libc_start_main+0xdf) [0x125d5f]
        /usr/bin/mono [0x805c551]
Aborted

Is it possible to use Generics in a Mono 1.0 project?

Thank you
Julien


More information about the Mono-list mailing list