LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 10-27-2010, 03:01 PM   #1
soppy
Member
 
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.
Code:
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, 11:46 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
It sounds like there was mixed libraries - perhaps another version of libpng on the box that compiled the thing.
 
Old 10-28-2010, 11:46 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run
Code:
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)
Code:
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
before running your application.

Regards

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

Original Poster
Blog Entries: 1

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.
 
  


Reply



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 03:36 AM
libpng and libpng-devel driving me crazy latino Linux - Server 6 06-27-2007 06:15 PM
error while loading shared libraries: libpng.so.2: [I reinstalled libPNG!] Shioni Linux - Software 1 09-09-2006 07:21 PM
libpng and libpng-devel missing in mplayer configure mmarkvillanueva Linux - Software 2 11-29-2005 10:40 PM
MPlayer install problems with libpng & libpng-devel Trey2501 Linux - Newbie 18 03-05-2004 11:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:05 PM.

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