libgdk-pixbuf reciprocal dependency - what am I not understanding?
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: libgdk-pixbuf reciprocal dependency - what am I not understanding?
- Date: Sat, 20 Nov 2010 19:14:06 +0000
I'm trying to build libgdk-pixbuf from source (actually, I'm building the whole of libgtk-win32 but let's
concentrate on libgdk-pixbuf, since that's where my current confusion lies).
I've figured out that libgdk-pixbuf relies on helper modules called 'loaders' which handle the various image
formats (bmp, jpeg, png etc). These loaders don't get built by the supplied VC++ projects (unless I've
missed something, which is entirely possible). However, I've found a number of preprocessor directives that
seem to determine (at build time) which loaders should get loaded at runtime - for example INCLUDE_bmp,
INCLUDE_jpeg, INCLUDE_png etc. If I build the main library without defining any of them, it builds fine but
when I try to run a program which needs to link to libgdk-pixbuf I see the runtime error "Cannot open pixbuf
loader module file" which is due to gdk_pixbuf_io_init() failing to initialize properly (naturally - having
not loaded any modules). So now I try to rebuild with those preprocessor directives defined. Let's take
INCLUDE_bmp as an example, although I think the same problem will probably apply to them all.
When I try to build libgdk_pixbuf-2.0_0.dll with INCLUDE_bmp defined, it fails with unresolved externals
because I haven't yet built libpixbufloader-bmp.dll. But if I try to build libpixbufloader-bmp.dll it also
fails if libgdk_pixbuf-2.0_0.dll hasn't yet been built. So with that preprocessor directive defined, neither
module will build until the other one's been built. Obviously this can't be right. I suspect that I should
only #define INCLUDE_bmp for one of the builds but not the other. Or maybe I should be building
libpixbufloader_bmp as a static lib, instead of a DLL.
I've also noticed (in the makefile) a possible project called libstatic_pixbufloader_bmp - so does one
normally build the loaders both as static libs AND dynamic libs? e.g. are there some kind of stub functions
which get replaced by the actual loader functions at run time, as the appropriate DLL's get found? I'm
floundering with this at the moment but I'd like to understand how it should work.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]