building an MSVC app with libpurple

David Byron dbyron at
Fri May 25 01:51:26 EDT 2007

> > Unfortunately I'm still missing glib-2.0.dll.  I don't
> > see that in the archive from Tor's site so I'm not sure
> > where to get it (or what piece of code is looking for it
> > for that matter).  Neither nm nor dumpbin seem to be
> > giving me much info.  If you can shed some light on what
> > code is looking for glib-2.0.dll it would be a big help.
> glib-2.0.dll is going to be the same thing as
> libglib-2.0.0.dll compiled differently.  Try using
> dependency walker to figure out what exactly is looking
> for it (it shouldn't be libpurple or any of the other
> deps).
> How did you link glib into the app that you're using
> libpurple for?  Did you build it with MSVC?

dependency walker did the trick.  When I type glib-2.0.lib into MSVC (really
Visual Studio 8) it ends up looking for glib-2.0.dll.  When I take it out
altogether I get unresolved externs for things like _g_timeout_add and
_g_main_loop_new.  I don't have a libglib-2.0-0.lib but I do have
libglib-2.0-0.dll so I put that on the link line.  Unfortunately this in a
dll that MSVC can't read.  MSVC fails to link with this error:

...\src\glib-2.12.11\bin\libglib-2.0-0.dll : fatal error LNK1107: invalid or
corrupt file: cannot read at 0x2B8

>From (the What is here,
then? section), I would have thought this DLL was in the right format
(although I may still get a mismatch with the MS C runtime libs but that's
not what happening at the moment).

Are there some tricks to convert libglib-2.0-0.dll into a format MSVC can

> I'm curious what exactly you're making.

I'm just trying to build a small test program that demonstrates I can mix
toolchains.  Eventually the plan is to use libpurple as part of a bigger app
that builds with MSVC.  Could we use mingw for everything?  Not sure, but
the other guys I work with are Windows folks through and through and are
basically demanding it.

Thanks again.


More information about the Devel mailing list