Re: State of GTK+ on Windows (Was: gtk 2 or 3)



On Thursday 28 October 2010 13:48:17 John Emmas wrote:
On 28 Oct 2010, at 11:52, Neil Bird wrote:


 So what are the curent issues with the Win32 GTK+ port?

 We have a cross-platform C++ class framework that we've developed at work, but it still relies on 
Windows MFC for the main GUI aspects.  I've always anticipated that should we be able to move to a cross 
platform GUI as well as cross-platform core code (most of our systems are head-less Linux boxes), we'd 
want to plump for GTK+.
  

I don't think Tor has any need to be beating himself up over gtk-win32.  I made exactly the same move about 
a year ago and would never go back to MFC now.  If I'm honest Neil, GTK2 does take a lot of getting used to 
if you've come from an MFC background - but once you've gotten your head around GTK, it really works very 
well indeed.  I daresay there are problems - just like any other technology - but for the kind of projects 
I'm involved in, GTK2 handles them very nicely.  Having said that, my apps don't tend to use 3D graphics or 
anything particularly fancy.  If you prefer C++ (like me) there's a handy wrapper for GTK+, called gtkmm.  
It's part of the Gnome project and works perfectly well.

So where will you have problems...?  As an MFC developer, am I right in thinking you'll be using Visual 
Studio as your build environment?  GTK+ and some (SOME) of it's dependencies already come with VS build 
projects.  But don't expect this to be universal.  Many dependencies only supply binaries for Visual C++ 6. 
 Unfortunately, VC++6 is hugely non-compliant and utterly useless for building modern projects.  You'll 
need to use at least VC++8 - but mixing your VC++8 with the older VC++6 support libs is very much fraught 
with problems.  If you want to continue using Visual Studio as your Windows IDE (which in many ways, I 
would recommend) you must be prepared to obtain the source code for ALL your dependencies and to build the 
whole lot with the same compiler.  I'm in the process of doing that now for a project called 'Ardour' which 
is probably the biggest project I've ever been involved in.  Building everything with VC++8 is possible but 
it's by no means easy.

If you want an easier route you might like to consider MinGW or Cygwin as your Windows build environment.  
You'll probably have an easier time with those compilers (esp. MinGW) but the downside is that you'll be 
stuck with the utterly dismal GDB debugger  :-(   For me, Microsoft's debugger is unsurpassed and I've 
persevered with VC++ for that reason alone.

So the choice is yours - ease of compilation or ease of debugging.  Maybe Tor can expand on what exactly 
are the deficiencies of gtk-win32.  But in general terms I don't think you've got much to be afraid of with 
GTK2 (except a steep learning curve maybe, and a good deal of hard work!)

John

Hi,
Take a look at http://www.codeblocks.org/. There you'll find a IDE that can be installed
both on linux and windows (and on windows comes with a bundled gcc compiler).
For me it worked very well and even allowed to port projetcs from linux to windows
with minimal effort. if you prefer a newer version of gcc  you can find one with
installer at http://tdm-gcc.tdragon.net/.

Hope this helps.
ZZ



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