Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-27-2010, 04:01 PM   #1
Registered: Mar 2008
Location: In your head!
Distribution: Arch Linux
Posts: 165
Blog Entries: 1

Rep: Reputation: 28
Problem with libpng

Hey guys. Seems like I'm having a problem with libpng. I've created a simple SDL app and last night it worked perfectly. Today, I tried it out again and it gave me this error.
libpng warning: Application was compiled with png.h from libpng-1.4.3
libpng warning: Application  is  running with png.c from libpng-1.2.44
libpng error: Incompatible libpng version in application and library
I didn't mess with anything related to libpng and I'm not sure what the problem is. I didn't even know I had libpng-1.2.44 installed. I'm not sure if this is an SDL_image problem or libpng or if it's just my path is wrong. Any help is appreciated.
Old 10-28-2010, 12:46 PM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,057

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
It sounds like there was mixed libraries - perhaps another version of libpng on the box that compiled the thing.
Old 10-28-2010, 12:46 PM   #3
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,206

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
You can run
ldd /path/to/SDL-app |grep libpng
to see where your application finds libpng.
If for example it uses libpng-1.2.44 from /usr/lib and you want to use libpng-1.4.3 that resides in /usr/local/lib, you can use (for bash)
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before running your application.


Last edited by bathory; 10-30-2010 at 05:43 PM.
Old 11-08-2010, 10:12 PM   #4
Registered: Mar 2008
Location: In your head!
Distribution: Arch Linux
Posts: 165
Blog Entries: 1

Original Poster
Rep: Reputation: 28
AH! I am so sorry. I found out what the problem was and forgot about this post. I forgot I had configured SDL_image to work with a different version of libpng directly in the source to make it compatible with an older machine I had and accidentally used that source code instead of the mainstream. I apologize for my stupid mistake and thank you for your help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem booting generic kernel and another problem with fluxbox - libpng warning Switch7 Slackware 17 11-14-2009 04:36 AM
libpng and libpng-devel driving me crazy latino Linux - Server 6 06-27-2007 07:15 PM
error while loading shared libraries: [I reinstalled libPNG!] Shioni Linux - Software 1 09-09-2006 08:21 PM
libpng and libpng-devel missing in mplayer configure mmarkvillanueva Linux - Software 2 11-29-2005 11:40 PM
MPlayer install problems with libpng & libpng-devel Trey2501 Linux - Newbie 18 03-06-2004 12:24 AM

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration