Tuesday, March 31, 2009

GMime Ported to Windows

The other day someone asked me about GMime on Windows and I didn't have anything to tell her other than that I thought people had built it successfully on Windows but beyond that, I didn't have any sort of VS project files or anything.

Then, last night, she poked me again asking for advice about some of the problems she was having building on Windows (which were mostly removing extraneous unistd.h includes from files that didn't need them and dropping source files that required them).

After a short while of back and forth, I decided I'd just boot into Windows myself and she helped me get my system setup (installing GNU Libiconv, grabbing the Gtk+ Windows dev packages, configuring VS to know where to look for those headers/libs, etc) so that I could more easily get instant feedback as to whether my source changes fixed the compile errors.

After a few hours of #include fixage and slight reworkings of some unix-specific code, we had a successful build of GMime.dll, woohoo!


Erno said...

Congrats and nicely done to both of you. Any chance of you posting the steps you followed to get this working? Or is there anywhere we could get the dll you built if the explanation would take too long? :-)

Jeffrey Stedfast said...

Erno: I'll try and write up some docs (or a blog post) on how to set it all up soon. Right now we are statically linking zlib, libiconv, glib-2.0 and gobject-2.0 which is probably not ideal (at least as far as glib/gobject go, the other 2 are probably fine the way they are).

I'd also like to make sure everything actually *works* before I unleash GMime.dll upon the world ;-)

Unfortunately I'm not sure how to setup VS Express to build a library and my unit tests, I might have to create another project or something. I'll likely need help from someone with some real knowledge of how to do things in VS (the woman I was helping was also not very experienced with doing what I wanted to do in VS so was unfortunately unable to tell me how to do it).

That said, I have the .sln and .vcproj files checked into the gmime module in GNOME SVN.

S said...

Who is "She" ?

Jeffrey Stedfast said...

She's an old friend of mine and she's working on a "Secret Project" which is why I haven't mentioned her name :-)

Code Snippet Licensing

All code posted to this blog is licensed under the MIT/X11 license unless otherwise stated in the post itself.