Re: Visual Studio 2008 configuration for GTK+2.22

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

 



Thanks for the responses..
I changed the .glade file to GtkBuilder format but now an even more strange bug appears...

- Build Output:

------ Build started: Project: gladetest, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\gtk\include\glib-2.0\gio\gioenums.h(630) : error C2065: 'GLIB_SYSDEF_AF_INET' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gioenums.h(632) : error C2065: 'GLIB_SYSDEF_AF_INET6' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gioenums.h(676) : error C2065: 'GLIB_SYSDEF_MSG_OOB' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gioenums.h(677) : error C2065: 'GLIB_SYSDEF_MSG_PEEK' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gioenums.h(679) : error C2065: 'GLIB_SYSDEF_MSG_DONTROUTE' : undeclared identifier
c:\gtk\include\glib-2.0\gio\giotypes.h(241) : error C2065: 'goffset' : undeclared identifier
c:\gtk\include\glib-2.0\gio\giotypes.h(241) : error C2146: syntax error : missing ')' before identifier 'current_num_bytes'
c:\gtk\include\glib-2.0\gio\giotypes.h(241) : error C2513: 'void *' : no variable declared before '='
c:\gtk\include\glib-2.0\gio\giotypes.h(243) : error C2059: syntax error : ')'
c:\gtk\include\glib-2.0\gio\giotypes.h(259) : error C2061: syntax error : identifier 'goffset'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(156) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(163) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(172) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(173) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(173) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(173) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(178) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(183) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(208) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(230) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(230) : error C2378: 'GVariant' : redefinition; symbol cannot be overloaded with a typedef
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(236) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(260) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(282) : error C2146: syntax error : missing ';' before identifier 'get_property'
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(282) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(282) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusconnection.h(452) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(78) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(78) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(78) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(79) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(82) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(84) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(84) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(84) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmessage.h(86) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmethodinvocation.h(46) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusmethodinvocation.h(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmethodinvocation.h(46) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusmethodinvocation.h(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusmethodinvocation.h(50) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(77) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(82) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(140) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(140) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(140) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(144) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(148) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(154) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(154) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(156) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(157) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(157) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(157) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(159) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gdbusproxy.h(163) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileinfo.h(901) : error C2146: syntax error : missing ';' before identifier 'g_file_info_get_size'
c:\gtk\include\glib-2.0\gio\gfileinfo.h(901) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileinfo.h(901) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileinfo.h(930) : error C2061: syntax error : identifier 'goffset'
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(64) : error C2059: syntax error : '*'
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(64) : error C2091: function returns function
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(64) : warning C4183: 'goffset': missing return type; assumed to be a member function returning 'int'
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(66) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gfileinputstream.h(66) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(64) : error C2059: syntax error : '*'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(64) : error C2091: function returns function
c:\gtk\include\glib-2.0\gio\gfileiostream.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileiostream.h(64) : warning C4183: 'goffset': missing return type; assumed to be a member function returning 'int'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(66) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(66) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(72) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gfileiostream.h(72) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(64) : error C2059: syntax error : '*'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(64) : error C2091: function returns function
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(64) : warning C4183: 'goffset': missing return type; assumed to be a member function returning 'int'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(66) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(66) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(72) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gfileoutputstream.h(72) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gseekable.h(63) : error C2059: syntax error : '*'
c:\gtk\include\glib-2.0\gio\gseekable.h(63) : error C2091: function returns function
c:\gtk\include\glib-2.0\gio\gseekable.h(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gseekable.h(63) : warning C4183: 'goffset': missing return type; assumed to be a member function returning 'int'
c:\gtk\include\glib-2.0\gio\gseekable.h(66) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gseekable.h(66) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gseekable.h(73) : error C2059: syntax error : '<L_TYPE_raw>'
c:\gtk\include\glib-2.0\gio\gseekable.h(73) : error C2238: unexpected token(s) preceding ';'
c:\gtk\include\glib-2.0\gio\gseekable.h(83) : error C2146: syntax error : missing ';' before identifier 'g_seekable_tell'
c:\gtk\include\glib-2.0\gio\gseekable.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gseekable.h(83) : error C2086: 'int goffset' : redefinition
        c:\gtk\include\glib-2.0\gio\gfileinfo.h(901) : see declaration of 'goffset'
c:\gtk\include\glib-2.0\gio\gseekable.h(83) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gseekable.h(86) : error C2061: syntax error : identifier 'goffset'
c:\gtk\include\glib-2.0\gio\gseekable.h(92) : error C2061: syntax error : identifier 'goffset'
c:\gtk\include\glib-2.0\gio\gsettings.h(87) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gsettings.h(88) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gsettings.h(88) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gsettings.h(88) : error C2086: 'int GVariant' : redefinition
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gsettings.h(89) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gsettings.h(160) : error C2143: syntax error : missing ';' before '*'
c:\gtk\include\glib-2.0\gio\gsettings.h(160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gsettings.h(160) : error C2378: 'GVariant' : redefinition; symbol cannot be overloaded with a typedef
        c:\gtk\include\glib-2.0\gio\gdbusconnection.h(170) : see declaration of 'GVariant'
c:\gtk\include\glib-2.0\gio\gsettings.h(161) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gsettings.h(161) : error C2143: syntax error : missing ',' before '*'
c:\gtk\include\glib-2.0\gio\gsettings.h(162) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\gtk\include\glib-2.0\gio\gsettings.h(176) : error C2061: syntax error : identifier 'GVariant'
c:\gtk\include\glib-2.0\gio\gsettings.h(197) : error C2065: 'value' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gsettings.h(198) : error C2065: 'result' : undeclared identifier
c:\gtk\include\glib-2.0\gio\gsettings.h(198) : error C2275: 'gpointer' : illegal use of this type as an _expression_
        c:\gtk\include\glib-2.0\glib\gtypes.h(72) : see declaration of 'gpointer'
c:\gtk\include\glib-2.0\gio\gsettings.h(199) : error C2275: 'gpointer' : illegal use of this type as an _expression_
        c:\gtk\include\glib-2.0\glib\gtypes.h(72) : see declaration of 'gpointer'
c:\gtk\include\glib-2.0\gio\gsettings.h(199) : error C2146: syntax error : missing ')' before identifier 'user_data'
c:\gtk\include\glib-2.0\gio\gsettings.h(199) : error C2513: 'gboolean *' : no variable declared before '='
c:\gtk\include\glib-2.0\gio\gsettings.h(199) : error C2059: syntax error : ')'
c:\gtk\include\glib-2.0\gio\gsettings.h(240) : error C2061: syntax error : identifier 'GSettingsBindSetMapping'
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(12) : error C2065: 'GtkBuilder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(12) : error C2065: 'builder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(17) : error C2065: 'builder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(17) : error C3861: 'gtk_builder_new': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(18) : error C2065: 'builder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(18) : error C3861: 'gtk_builder_add_from_file': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(19) : error C2065: 'builder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(19) : error C3861: 'gtk_builder_get_object': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(20) : error C2065: 'builder' : undeclared identifier
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(20) : error C3861: 'gtk_builder_connect_signals': identifier not found
c:\documents and settings\administrator\my documents\visual studio 2008\projects\gladetest\gladetest\main.cpp(22) : error C2065: 'builder' : undeclared identifier
Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\gladetest\gladetest\Debug\BuildLog.htm"
gladetest - 129 error(s), 4 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Something seems wrong with the gio.lib ... but what?? and WHY????


On 20 March 2011 23:14, Lukas Kontenis <dse.ssd@xxxxxxxxx> wrote:
I'm not sure if VS handles your file as C properly, it is not what's causing this particular problem, but still.

I think your problem is due to the fact, that the XML file provided is in the "Libglade" format, whereas the sample code uses "GtkBuilder". So either produce a GtkBuilder version of the XML file by selecting "GtkBuilder" in Edit->Preferences of your Glade or just change tags:

<glade-interface> to <interface>
<widget> to <object>

For such a small file that should do but it's completely unprofessional <:

By the way, just noticed, this is explained in one of the comments of the tutorial page...

See if any of this helps.

solarsd

On Wed, Mar 16, 2011 at 4:37 PM, Odysseas Zografos <zografos.odysseas@xxxxxxxxx> wrote:
Hello everyone,
 I'm trying to run a simple gtk+ application with Microsoft Visual Studio 2008 under Windows XP.
I downloaded the bundle folder of GTK+2.22, added the C:\...\gtk\bin to the Path Environment Variable,
executed pkg-config --cflags --libs gtk+-2.0 and gtk-demo (run fine..). To Visual Studio, I added all the "-I" results of the pkg-config to Tools->Options->VC++ Directories->Include Files, added the "-L" results (C:\...\gtk\lib) to Tools->Options->VC++ Directories->Library Files and finally added all the "-l" results (.lib files) to Project->Project Properties->Linker->Input->Additional Dependencies.

Testing it...
In order to test my settings I did the following:
- Created a new Empty project in Visual Studio 2008.
- Added a new .cpp file (main.cpp).
- Created an "tutorial.glade" file by copying/pasting the XML code shown here
- Changed the "id = window1" to "id = window" in line 5 of .glade file because it caused an error.
- Compiled it just fine...
  BUILD OUTPUT
------ Rebuild All started: Project: gladetest, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'gladetest', configuration 'Debug|Win32'
Compiling...
main.cpp
Linking...
LINK : C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\gladetest\Debug\gladetest.exe not found or not built by the last incremental link; performing full link
Embedding manifest...
Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\gladetest\gladetest\Debug\BuildLog.htm"
gladetest - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

- Run it:
        Window pops up: Gtk-CRITICAL **: gtk_widget_show: assertion 'GTK_IS_WIDGET <widget>' failed
Error showed in the screen-shot attached.

All the steps above have confirmed in some way from a lot of hours googling! I've tried for 4 days now to configure it properly but no luck...
I really need this to work, so If anybody has a similar experience on this problem or any solutions to suggests I would deeply appreciate it!

--
Zografos Odysseas
Undergraduate Student
ECE Dept., Technical University of Crete (T.U.C)
Greece


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list





--
Zografos Odysseas
Undergraduate Student
ECE Dept., Technical University of Crete (T.U.C)
Greece

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux