SDL_image + libpng + Panther = version mismatch

Post: #1
Hello everyone,

I'm currently trying to use SDL_image in a project, and I need PNG support. The project compiles fine, and SDL_image works fine with JPEG images, but when I try to load a PNG file, I get the following errors in the run log :

libpng warning: Application was compiled with png.h from libpng-1.0.12
libpng warning: Application  is  running with png.c from libpng-1.2.8
libpng error: Incompatible libpng version in application and library

I tried using the prepackaged installer from the libSDL website and linking with the framework located in /Library/Frameworks, but that didn't help.

I tried compiling my own version of the Frameworks with the source code and the supplied version of libpng.a that is included with the source, but I get the same error. I tried replacing this libpng.a file with a new one compiled with the libPNG source, but that doesn't help either.

I'm *guessing* that my app is not using the libpng.a file that comes with SDL_image, but the one installed on the system in /usr/local/lib.

Has anyone had this problem in the past? How was it resolved?

I'm running Panther 10.3.9 on a Mac mini, with XCode 1.5, by the way. Haven't tried on Tiger to see if I get the same error.
Quote this message in a reply
Posts: 257
Joined: 2004.06
Post: #2
Having you tried installing the libpng binaries you built? I.e., sudo make install from within the PNG source directory.

The brains and fingers behind Malarkey Software (plus caretaker of the world's two brattiest felines).
Quote this message in a reply
Post: #3
I thought about it, but then once the game is done and I want someone to use it, this person would have to do the same on his/her system. I would think forcing the user to do a sudo make install is not the user-friendly way of running a game. I deally, the game would have to be a simple .app bundle working right out of the box...
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  libPng And Memory Access Violations Jaden 12 22,796 Sep 4, 2013 04:50 AM
Last Post: miye
  Trouble using SDL_image with XCode 3.2.3 Snow Leopard code4fun 1 6,075 Sep 22, 2010 10:47 PM
Last Post: OneSadCookie
  SDL_image and bmp loading Duane 13 13,920 Dec 21, 2009 09:14 AM
Last Post: Skorche
  libpng loading junk at bottom of my OpenGL textures...? BinarySpike 6 10,555 Apr 19, 2007 12:20 PM
Last Post: BinarySpike
  libpng transparency problem wyrmmage 3 7,836 Mar 1, 2007 05:53 PM
Last Post: OneSadCookie