[Insight-users] Incompatible PNG libs

Gavin Baker gavinb+xtk at cs.mu.OZ.AU
Mon, 3 May 2004 15:48:54 +1000


Hello Michael,

On Fri, Apr 30, 2004 at 12:24:55PM -0000, Michael Eichler wrote:


> [...]
> It all compiles and links well, but when I try to open a .png file through my
> gui, I get the following error:
> 
> libpng warning: Application was compiled with ping.h from libpng-1.2.5
> libpng warning: Application is running with ping.c from libpng-1.0.12
> libpng error: Incompatible libpng versions in application and library
> 
> I forebode that there's a conflict between QT's and ITK's PNG library (the qt
> and itk applications itself work fine), but I have no idea how to solve this 
> conflict!?
> 
> I'm using ITK 1.6.0, QT 3.2.1 and CCMAKE 1.8.3 on Suse 9.0.

I suggest you rebuild ITK with ITK_USE_SYSTEM_* enabled (as Jim suggested).

This is how I build the Debian packages, and it works well (plays nicely)
with other toolkits that use libpng et al also.

Under Posix platforms (Linux, Solaris, Mac OS X, etc) these libraries are
almost always provided by the system in /usr/lib (or /sw/lib), and you
always want to use these wherever possible.

I think the included libpng,tiff,jpg libraries are only really useful for
building under Windows, where such libraries are not necessarily expected to
be present.

  :: Gavin

-- 
Gavin Baker                                      Complex Systems Group
http://www.cs.mu.oz.au/~gavinb             The University of Melbourne