Getting Started with GTK VS and VC ++ Express


GTK VS Summary

Recommendation : Before Starting you should read this minimal sample showing why you should take care about not mixing
c runtimes in your applications

 
This Quick Start Guide assumes that you installed GTK VS runtimes
and the GTK development package
 
1. Create a new console project using VC ++ Express
2. Include necessary Headers : you can paste GTK includes search path from here:
"$(GTK)\include";"$(GTK)\include\glib";"$( GTK)\include\gmodule";"$(GTK)\include\gthread";"$(GTK)\include\gobject";"$(GTK)\include\cairo";"$(GTK)\include\gdk";"$(GTK)\include\gtk";

3. SET THE RUNTIME to dynamic libraries (Multi Threaded Debug DLL or Multi Threaded DLL) if not set
4 Add the following preprocessor definitions :
if using zlib , ZLIB_DLL must be defined
if using libpng , PNG_DLL must be defined

5 Add the $(GTK)\libs path to the Additionnal Library Path
6 Add GTK libraries External Dependencies
Using Visual Studio 2005 and GTK+VS 2005
For debug Configurations , an exhaustive set is provided here :
intl-vs8_debug.lib glib-2.0-rev3-vs8_debug.lib gthread-2.0-vs8_debug.lib gmodule-2.0-rev1-vs8_debug.lib gobject-2.0-vs8_debug.lib
gdk_pixbuf-2.0-vs8_debug.lib gtk-win32-2.0-vs8_debug.lib gdk-win32-2.0-vs8_debug.lib libcairo-2-vs8_debug.lib
libxml2-vs8_debug.lib libatk-1.0-0-rev1-vs8_debug.lib pango-1.0-vs8_debug.lib
For release Configurations , an exhaustive set is provided here :
intl-vs8.lib glib-2.0-rev3-vs8.lib gthread-2.0-vs8.lib gmodule-2.0-rev1-vs8.lib gobject-2.0-vs8.lib gdk_pixbuf-2.0-vs8.lib
gtk-win32-2.0-vs8.lib gdk-win32-2.0-vs8.lib libcairo-2-vs8.lib libxml2-vs8.lib libatk-1.0-0-rev1-vs8.lib pango-1.0-vs8.lib

Using Visual Studio 2008 and GTK+VS 2008
For debug Configurations , an exhaustive set is provided here :
intl-vs9_debug.lib glib-2.0-rev3-vs9_debug.lib gthread-2.0-vs9_debug.lib gmodule-2.0-rev1-vs9_debug.lib gobject-2.0-vs9_debug.lib
gdk_pixbuf-2.0-vs9_debug.lib gtk-win32-2.0-vs9_debug.lib gdk-win32-2.0-vs9_debug.lib libcairo-2-vs9_debug.lib
libxml2-vs9_debug.lib libatk-1.0-0-rev1-vs9_debug.lib pango-1.0-vs9_debug.lib
For release Configurations , an exhaustive set is provided here :
intl-vs9.lib glib-2.0-rev3-vs9.lib gthread-2.0-vs9.lib gmodule-2.0-rev1-vs9.lib gobject-2.0-vs9.lib gdk_pixbuf-2.0-vs9.lib
gtk-win32-2.0-vs9.lib gdk-win32-2.0-vs9.lib libcairo-2-vs9.lib libxml2-vs9.lib libatk-1.0-0-rev1-vs9.lib pango-1.0-vs9.lib

7. Compile the application.

The GTK Sample Tictatoe is avaliable for download here : GTK TicTacToe Sample VC++ 2005 Solution
Extract it Compile it and Run it

TicTacToe Running Out of The Development Environment

Hosted by:
SourceForge.net Logo
Copyright © 2007-2008 Pierre Barthe