LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with libpng (https://www.linuxquestions.org/questions/linux-software-2/problem-with-libpng-840821/)

soppy 10-27-2010 03:01 PM

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. :D

business_kid 10-28-2010 11:46 AM

It sounds like there was mixed libraries - perhaps another version of libpng on the box that compiled the thing.

bathory 10-28-2010 11:46 AM

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

soppy 11-08-2010 09:12 PM

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. :D


All times are GMT -5. The time now is 01:25 AM.