Re: Compiling a GTK application on windows

Hello Vikram,

Just a few things to let you know about using GTK+ for development on 

-Yes, GTK+ (the precompiled binaries) can be used in Visual Studio as well
 as MinGW

-It is possible to compile the GTK+ stack (at least GLib, Pango, ATK, 
 GDK-Pixbuf and most of the dependencies) with recent Visual Studio 
 versions without source code changes.  VS 2008/2010 Project files are 
 either already available in them, or in their latest unstable versions, 
 or will be  included in the next unstable (eventually stable release)

-If you use the precompiled binaries or built the GTK+ stack with MinGW, 
 it is recommended that you use MSVCRT.dll CRT for your GTK+-application; 
 if you compiled the GTK+ stack  yourself in VS, then it it recommended 
 that you use the CRT DLL that is used in your version of Visual Studio

-You can take a look at on
 how you use GTK+ in development under Windows with MinGW; in Visual 
 Studio, one can include <gtk/gtk.h> and start from there.  Use /MD 
 (release) or /MDd (for debug) for your Runtime selection, and normally
 you will need to set the linker to link to gtk-win32-$(GTK_VER).lib, 
 gdk-win32-$(GTK_VER).lib, pangocairo-1.0.lib, pango-1.0.lib, atk-1.0.lib
 gobject-2.0.lib and glib-2.0.lib.  There could be more GTK+-related 
 libraries that you need link to, but this is normally the minimal list.

For other people here ( :) ):
-MinGW and its cross-compilation efforts IMHO are formidable projects, but
 please understand that there are people who develop on/for Windows that
 cannot or will not use it for various reasons-such as those that are not
 allowed by company policy to install such environments on their dev 
 platform, or those who prefer to use the Visual Studio debugger in their
 work, or those that feel it takes too long to compile the GTK+ stack on
 Windows using MinGW.  There are most probably other reasons for this, too.

-Two of the reasons why Visual Studio projects are added/maintained are
 1. The allow people to compile/use the GTK+ as quickly as possible on 
    Windows with the DLLs linked to the CRT that they will use in their 
    development environment.
 2. To encourage people to contribute to GTK+ (on Windows especially) to
    make it work better (also especially on Windows).

-I am working on a post to tell people how to compile the
 GTK+ stack on Windows using Visual Studio.  Hopefully I could get that 
 done ASAP, time permitting.  Sorry for the delay.

Hope this helps to clear things up-sorry for the longish post.

God Bless,
Fan, Chun-wei

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