[Mono-devel-list] wchar vs char?

Nikolai Zhubr s001 at hotbox.ru
Thu May 6 15:26:40 EDT 2004


Hi people,
I'm new to mono, please forgive my stupidity if I ask silly
questions :)
I've installed mono runtime 0.31 and am now trying
.net-targeted GPCP compiler, which is mentioned on mono site
as one of (apparently) usable with mono.
After some minimal fighting I was indeed able to make
GPCP go and produce IL code for "Hello World" example,
but it then failed to compile further to bytecode:
          ...........
          ldstr "Hello CP World"
          call wchar[] [RTS]CP_rts::strToChO(string)
syntax error, got token `K_WCHAR', expecting BANG K_INSTANCE
K_EXPLICIT K_DEFAULT K_VARARG K_UNMANAGED K_VALUE K_NATIVE
K_VOID K_BOOL K_INT8 K_INT16 K_INT32 K_INT64 K_FLOAT32
K_FLOAT64 K_UNSIGNED K_METHOD K_CLASS K_TYPEDREF K_CHAR
K_VALUETYPE K_OBJECT K_STRING

I have found however that pre-compiled Hello.exe does
work. So, I've disassembled it and got the following:

          ...........
IL_0006:  ldstr "Hello CP World"
IL_000b:  call char[] class [RTS]'CP_rts'::'strToChO'(string)

One can notice "call char[]..." instead of "call wchar[]" here.
Could someone explain me what does it mean, and better yet,
how to fix (or workaround) this problem? I would have looked
through appropriate specs myself gladly but I couldn't find
any relevant docs, so any usefull refs are greatly appreciated.
I've found that "wchar" keyword is present in ilasm.xml and
ILTables.cs within mcs-0.31 package, but the readme says one
should only need mcs package for class development, which is
not quite what I'm doing. So far at this point I'm stuck.

Thank you.
-- 
Best regards,
 Nikolai Zhubr





More information about the Mono-devel-list mailing list