wxGTK3/Win32 msvc2008 compilation errors with pure C files



Hello Tarnyko,

I'm trying to build wxGTK3/Win32 using Visual C++ 9.0 (2008) and I have compilation errors in src/gtk/treeentry_gtk.c and src/gtk/eggtrayicon.c files:
<https://github.com/kosenko/wxWidgets/blob/gtkwin/src/gtk/treeentry_gtk.c>
<https://github.com/kosenko/wxWidgets/blob/gtkwin/src/gtk/eggtrayicon.c>
It seems that error specific for *.c files because *.cpp files such as src/gtk/window.cpp compiles without errors. Also wxGTK2/Win32 and wxGTK3/X11/Linux ports compile and work without any errors.

Steps to reproduce:
1. Setup <http://win32builder.gnome.org/gtk+-bundle_3.10.4-20131202_win32.zip> 2. Build wxGTK3 as described in <https://github.com/kosenko/wxWidgets/blob/gtkwin/docs/msw/gtk.txt> wxGTK/Win32 is enabled by default in my repository <https://github.com/kosenko/wxWidgets> I used build/msw/wx_vc9.sln solution file and GTK+ 3 paths instead of GTK+ 2. Also uncomment "#define __WXGTK3__" before first build in include/wx/gtk/setup.h (manually copied from setup0.h).

It looks like gchar isn't defined in gtk3\include\glib-2.0\glib/gutils.h file during *.c files compilation
<code>
#if defined (G_OS_WIN32) && defined (G_CAN_INLINE) && !defined (__cplusplus)
/* This function is not part of the public GLib API either. Just call
 * g_get_system_data_dirs() in your code, never mind that that is
 * actually a macro and you will in fact call this inline function.
 */
static inline const gchar * const * /* error C2143: syntax error : missing '{' before 'const' */
_g_win32_get_system_data_dirs (void)
{
return g_win32_get_system_data_dirs_for_module ((void (*)(void)) &_g_win32_get_system_data_dirs);
}
#define g_get_system_data_dirs _g_win32_get_system_data_dirs
#endif
</code>

Build output:
1>------ Build started: Project: core, Configuration: GTK+ Debug Win32 ------
1>Compiling...
1>treeentry_gtk.c
1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(128) : error C2143: syntax error : missing '{' before 'const' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(277) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(277) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(278) : error C2085: 'g_bit_nth_lsf' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(279) : error C2082: redefinition of formal parameter 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(279) : error C2146: syntax error : missing ',' before identifier 'gint' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(279) : error C2146: syntax error : missing ',' before identifier 'g_bit_nth_msf' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(279) : error C2143: syntax error : missing ';' before '(' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(280) : error C2059: syntax error : ')' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(281) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(281) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(281) : error C2085: 'g_bit_storage' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(286) : error C2082: redefinition of formal parameter 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(286) : error C2146: syntax error : missing ',' before identifier 'gint' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(287) : error C2146: syntax error : missing ',' before identifier 'g_bit_nth_lsf' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(287) : error C2143: syntax error : missing ';' before '(' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(288) : error C2059: syntax error : ')' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(301) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(301) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(303) : error C2085: 'g_bit_nth_msf' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(303) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(315) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(315) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(316) : error C2085: 'g_bit_storage' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gutils.h(316) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gstring.h(162) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gstring.h(162) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gstring.h(165) : error C2085: 'g_string_append_c_inline' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gstring.h(165) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(44) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(44) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(45) : error C2085: 'g_trash_stack_push' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(46) : error C2082: redefinition of formal parameter 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(46) : error C2146: syntax error : missing ',' before identifier 'gpointer' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(46) : error C2146: syntax error : missing ',' before identifier 'g_trash_stack_pop' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(46) : error C2143: syntax error : missing ';' before '(' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(46) : error C2059: syntax error : ')' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(47) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(47) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(47) : error C2085: 'g_trash_stack_peek' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(48) : error C2082: redefinition of formal parameter 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(48) : error C2146: syntax error : missing ',' before identifier 'guint' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(48) : error C2146: syntax error : missing ',' before identifier 'g_trash_stack_height' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(48) : error C2143: syntax error : missing ';' before '(' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(48) : error C2059: syntax error : ')' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(53) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(53) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(55) : error C2085: 'g_trash_stack_push' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(55) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(62) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(62) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(63) : error C2085: 'g_trash_stack_pop' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(63) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(79) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(79) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(80) : error C2085: 'g_trash_stack_peek' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(80) : error C2143: syntax error : missing ';' before '{' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(88) : warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(88) : error C2054: expected '(' to follow 'inline' 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(89) : error C2085: 'g_trash_stack_height' : not in formal parameter list 1>C:\proging\gtk3\include\glib-2.0\glib/gtrashstack.h(89) : error C2143: syntax error : missing ';' before '{' 1>..\..\src\gtk\treeentry_gtk.c(91) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(97) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(103) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(118) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(126) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(146) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(147) : warning C4127: conditional expression is constant 1>..\..\src\gtk\treeentry_gtk.c(157) : warning C4127: conditional expression is constant

Regards,
Kolya.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]