[Mono-dev] Error in eglib while compiling mono under Windows\VS2008

Bill Holmes billholmes54 at gmail.com
Wed Nov 5 13:42:49 EST 2008


I am fixing this right now.

On Wed, Nov 5, 2008 at 1:36 PM, Alexander M. Batishchev
<abatishchev at godfather.net.ru> wrote:
> Hello everybody,
>
> I'm trying to compile Mono from SVN under VS 2008. Opened mono\msvc\mono.sln
> and got error (after successful conversion of course) in eglib:
>
> First of all options Threat warnings as errors is On, could you please say
> me what for?
> Line 1854 in mono\eglib\src\unicode-data.h:
> simple_upper_case_mapping_lowarea_table_count = 8;
> instead of
> int simple_upper_case_mapping_lowarea_table_count = 8;
>
> And i got broken compilation immediately because of
> Warning C4431: missing type specifier - int assumed. Note: C no longer
> supports default-int
> Warning C4218: nonstandard extension used : must specify at least a storage
> class or a type
> Ok, add int and go to my general problem.
>
> Lines after 123 in mono\eglib\src\gunicode.c:
> gunichar
> g_unichar_case (gunichar c, gboolean upper)
> {
>        gint8 i, i2 = 0;
>        guint32 cp = (guint32) c, v;
>
>        for (i = 0; i < simple_case_map_ranges_count; i++) {
>                if (cp < simple_case_map_ranges [i].start)
>                        return c;
>                if (simple_case_map_ranges [i].end <= cp)
>                        continue;
>                if (c < 0x10000) {
>                        guint16 *tab16 = upper ?
> simple_upper_case_mapping_lowarea [i] : simple_lower_case_mapping_lowarea
> [i];
>                        v = tab16 [cp - simple_case_map_ranges [i].start];
>                } else {
>                        i2 = i - (upper ?
> simple_upper_case_mapping_lowarea_table_count :
> simple_lower_case_mapping_lowarea_table_count);
>                        guint32 *tab32 = upper ?
> simple_upper_case_mapping_higharea [i2] : simple_lower_case_mapping_higharea
> [i2];
>                        v = tab32 [cp - simple_case_map_ranges [i].start];
>                }
>                return v != 0 ? (gunichar) v : c;
>        }
>        return c;
> }
>
> Error output:
>
> Error C2275: 'guint32' : illegal use of this type as an expression
> d:\visual studio 2008\projects\mono\trunk\mono\eglib\src\gunicode.c:139
>
> Error  C2065: 'tab32' : undeclared identifier
> d:\visual studio 2008\projects\mono\trunk\mono\eglib\src\gunicode.c:139
>
> Error  C2065: 'tab32' : undeclared identifier
> d:\visual studio 2008\projects\mono\trunk\mono\eglib\src\gunicode.c:140
>
> Error  C2109: subscript requires array or pointer type
> d:\visual studio 2008\projects\mono\trunk\mono\eglib\src\gunicode.c:140
>
> Error is contained in line 138:
> i2 = i - (upper ? simple_upper_case_mapping_lowarea_table_count :
> simple_lower_case_mapping_lowarea_table_count);
>
> If remove declaration of the variable from method's head and put it into the
> line everything compiles good!
> gint8  i2 = i - (upper ? simple_upper_case_mapping_lowarea_table_count :
> simple_lower_case_mapping_lowarea_table_count);
>
> Why it could be so?? Is it bug of Microsoft Visual C++ compiler or something
> else?
> Thanks a lot for tip!
>
> PS. Am I right to write it here or is there a better place to do that?
>
> ===
> Best regards,
> Alexander M. Batishchev
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


More information about the Mono-devel-list mailing list