Re: GTK+ on windows



Here is a little update on my project to get gtk building in the
visual studio tool chain.

glib.dll

* Successfully compiles with both intel c and msvc

* Only one extremely minor code change to glib for it to build
(_snprintf rather than snprintf)

* GNU gettext is hopeless and unportable in it's current state, using
a custom stub I wrote myself because the one from Tor looks way too
cluttered for my brain to wrap around it.

*Horrendous number of 64bit->32bit data loss compiler warnings since
things like size_t return types are routinely ignored, as well as
storing pointer arithmetic results into 32bit int.

Some size comparisons:
mingw glib (889 KB)
msvc glib (304 KB)
intel c glib (192KB)

As one would expect the intel compiler is considerably better than microsoft.

The mingw result is a bit predictable considering it has to pull in
half the universe to function outside of its natural habitat.

Anyways, I wanted to post the above results as a proof of concept to
demonstrate that maybe this just might be the right way to go.

Things like gio, gthread etc haven't been started yet, but I would
expect the same drop in binary size clear across the board, mingw
produces a gtk.dll over 3mb so lets cross our fingers.

Looking forward in time, dependencies like libjpeg, libtiff, libpng
can probably be replaced with native gdi+ functionality to further
reduce the complexity of the stack.
http://msdn.microsoft.com/en-us/library/ms536393(VS.85).aspx

Also, #include "config.h" should be wrapped in HAVE_CONFIG_H
everywhere....  What a pain in the ass.

I chose to use the latest pcre rather than whatever comes with glib.
It seemed appropriate.

Lastly, I'll throw up a google code project for the whole shebang if
there is interest.  I could certainly use some help.

--
Ted Bullock <tbullock comlore com>


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