Re: Visual Studio 2008 configuration for GTK+2.22

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.


On Wed, Mar 16, 2011 at 4:37 PM, Odysseas Zografos <zografos odysseas gmail com> 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 "" 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...
------ Rebuild All started: Project: gladetest, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'gladetest', configuration 'Debug|Win32'
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)

gtk-list mailing list
gtk-list gnome org

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