Please fix sdl_image! It still uses very old libpng and jpeg.lib!

Dear sdl - developers,
Could you please upgrade current sdl_image library?
It still uses very old versions of zlib, libpng and jpeg.lib.
There are actual versions for all systems on
http://sourceforge.net/project/showfiles.php?group_id=23617

I slowly get crazy compiling my game scince two days with two different
libpng versions, scince fltk lib (www.fltk.org) needs a more actual
version of libpng. I cant get it to work. Even if i would, it would be a
waste of space to have libpng1.dll and libpng.dll distributed in one
package!

(if my problem is solved in the actual cvs - version of sdl_image,
please let me know)

Thanks in advance, andre

Dear sdl - developers,
Could you please upgrade current sdl_image library?
It still uses very old versions of zlib, libpng and jpeg.lib.
There are actual versions for all systems on
http://sourceforge.net/project/showfiles.php?group_id=23617

I slowly get crazy compiling my game scince two days with two different
libpng versions, scince fltk lib (www.fltk.org) needs a more actual
version of libpng. I cant get it to work. Even if i would, it would be a
waste of space to have libpng1.dll and libpng.dll distributed in one
package!

(if my problem is solved in the actual cvs - version of sdl_image,
please let me know)

Thanks in advance, andre

Hi !

I recently “switched” to Mac OS X ( but coming from Linux, not
windoze :), and I have some troubles building SDL_image.

I have downloaded, compiled and installed the required additional
packages ( libpng-1.2.4, zlib-1.1.4, jpeg-6b ), but configure does not
find the libraries !

Here are the related lines, generated by ./configure :

--------------- start ----------------

checking for jpeg_CreateDecompress in -ljpeg… no
configure: warning:
*** Unable to find JPEG library (http://www.ijg.org/)

configure: warning: JPG image loading disabled
checking for png_create_read_struct in -lpng… no
configure: warning:
*** Unable to find PNG library
(http://www.libpng.org/pub/png/libpng.html)

checking for uncompress in -lz… yes
configure: warning: PNG image loading disabled

--------------- end ----------------

I checked and those libraries are in /usr/local/lib ( as all other SDL
libraries ).
Here is the related content of this directory :

libbz2.a
libjpeg.a
libpng. -> libpng12.0.1.2.4.
libpng.3. -> libpng12.0.1.2.4.
libpng.3.1.2.4. -> libpng12.0.1.2.4.
libpng.a -> libpng12.a
libpng12.0.1.2.4.dylib
libpng12.0.dylib -> libpng12.0.1.2.4.dylib
libpng12.a
libpng12.dylib -> libpng12.0.dylib
libz.a
pkgconfig (DIR)

and in pkgconfig :
libpng.pc -> libpng12.pc
libpng12.pc

I don’t understand why configure script does not find libpng & libjpeg !
/usr/local/lib is in LD_LIBRARY_PATH and I tried --libdir=/usr/local but
it didn’t change anything.

I then modified Makefile and added manually -DLOAD_JPG -DLOAD_PNG to
CFLAGS and -lpng -ljpeg to LIBS and it compiled perfectly, but I still
got an error at link time :

--------------- start ----------------
/bin/sh ./libtool --mode=link gcc -g -O2 -I/usr/local/include
-I/usr/local/include/SDL -D_THREAD_SAFE
-F/System/Library/Frameworks/Carbon.framework
-F/System/Library/Frameworks/Cocoa.framework -DLOAD_BMP -DLOAD_GIF
-DLOAD_LBM -DLOAD_PCX -DLOAD_PNM -DLOAD_TGA -DLOAD_JPG -DLOAD_PNG
-DLOAD_TIF -DLOAD_XPM -o showimage showimage.o libSDL_image.la
-L/usr/local/lib -lSDLmain -lSDL -ljpeg -lpng -ltiff -framework OpenGL
-framework AGL -framework IOKit -framework Carbon -framework Cocoa
gcc -g -O2 -I/usr/local/include -I/usr/local/include/SDL -D_THREAD_SAFE
-F/System/Library/Frameworks/Carbon.framework
-F/System/Library/Frameworks/Cocoa.framework -DLOAD_BMP -DLOAD_GIF
-DLOAD_LBM -DLOAD_PCX -DLOAD_PNM -DLOAD_TGA -DLOAD_JPG -DLOAD_PNG
-DLOAD_TIF -DLOAD_XPM -o showimage showimage.o .libs/libSDL_image.a
-L/usr/local/lib -lSDLmain -lSDL -lSDLmain -lSDL -ljpeg -lpng -ltiff
-L/usr/local/lib -lSDLmain -lSDL -ljpeg -lpng -ltiff -framework OpenGL
-framework AGL -framework IOKit -framework Carbon -framework Cocoa
ld: table of contents for archive: /usr/local/lib/libjpeg.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libpng.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libjpeg.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libpng.a is out of
date; rerun ranlib(1) (can’t load from it)
--------------- end ----------------

I then tried to run ranlib on each of the specified libraries, but it
didn’t change anything…

Can someone help me ?

Thanks.–
Daniel Morais

Hi !

I recently “switched” to Mac OS X ( but coming from Linux, not
windoze :), and I have some troubles building SDL_image.

I have downloaded, compiled and installed the required additional
packages ( libpng-1.2.4, zlib-1.1.4, jpeg-6b ), but configure does not
find the libraries !

Have you heard of Fink? (http://fink.sf.net) It’s a Debian-style
packaging system for Mac OS X, and it includes almost all your favourite
Linux utilities, like XFree86, GIMP, and of course libpng, libjpeg,
zlib, and so forth.

Having installed GIMP via Fink, I already had libpng and libjpeg
installed. I configured SDL_image with a commandline like:

CFLAGS=’-I/sw/include -traditional-cpp’ LDFLAGS=’-L/sw/lib’ ./configure

…and then it built cleanly.

Out of curiosity, if you compile SDL_image in ProjectBuilder on a clean
(Fink-free) install of OS X, does SDL_image include the ability to read
PNG and JPEG files?On Tuesday, August 6, 2002, at 10:17 , Daniel Morais wrote:

Tim Allen writes:

Out of curiosity, if you compile SDL_image in ProjectBuilder on a clean
(Fink-free) install of OS X, does SDL_image include the ability to read
PNG and JPEG files?

Yes, but I had to download the libraries seperately and add
-DLOAD_PNG=1 etc to the compile flags.–
jv

Le mardi 6 ao?t 2002, ? 04:12 , Tim Allen a ?crit :

Have you heard of Fink? (http://fink.sf.net) It’s a Debian-style
packaging system for Mac OS X, and it includes almost all your
favourite Linux utilities, like XFree86, GIMP, and of course libpng,
libjpeg, zlib, and so forth.

Thanks for the tip, but yes, someone already told me about Fink.
Fink is fine, but the problem is that often the packages are not up to
date : just look at the SDL ones…
Anyway, I had no problem to compile and install lipbng, libjpeg and
zlib : as I said, the problem just come after, when I try to make
SDL_image find them.

Out of curiosity, if you compile SDL_image in ProjectBuilder on a clean
(Fink-free) install of OS X, does SDL_image include the ability to read
PNG and JPEG files?

Yes, and despite what was said previously, using the project for
ProjectBuilder that came with SDL_image, you don’t need to change
anything nor download additional libraries, PNG & JPEG support is
present and work fine ( I tried to load a PNG picture with ‘showimage’ ).

To be honest, I didn’t made a lot of tests with ProjectBuilder : I’m
used to “simple” Makefile, where I can see ( and change ) everything,
nothing is “hiden”.
I first made some tests, with pre packaged version, and was disapointed
by the result : an application built by ProjectBuilder using those
pre-packaged frameworks ( devel ones ) was a lot slower than the same
app compiled and linked to SDL via command line ( with a command line
generated SDL )…

That was before I noticed there is a PBProjects.tar.gz file given with
SDL and SDL_image source versions !!!

Reading the doc, I understood why using the pre-packaged framework
version was so slow : I installed devel version, and I guess it was
compiled in debug mode, with no optimisation…

The ProjectBuilder files provided with SDL and SDL_image are really
great !!

They allow to easely build and install those frameworks, as well as to
test if everything run fine.

So, now, I still don’t know how to have png & jpeg support with
SDL_image on the command line shell under Mac OS X ( too much troubles
making the tools find the libraries ), but I don’t care anymore, as the
framework version just rock !
:wink:

Nice job, guys !–
Daniel Morais

i cannot help you, but i expirienced such troubles too. first, sdl_
image uses under win32 a very old libpng, so that i assume you can
not use the the new libpng 1.2.4 scince it has a changed interface.
i also failed completely to build static libs under win32 and vc++7,
so i eventually gave up and now somehow managed to get my game
running using a mixture of libpng1.dll (supplied with sdl_image) and
libpng.dll (for fltk) an jpeg.dll and libjpeg.dll.
crazy, maybe libsdl and libfltk.org should team up and update to the
latest libpng and libjpeg libraries!!

greetings, andre

Daniel Morais wrote:
(08/06/2002 14:17)>Hi !

I recently “switched” to Mac OS X ( but coming from Linux, not
windoze :), and I have some troubles building SDL_image.

I have downloaded, compiled and installed the required additional
packages ( libpng-1.2.4, zlib-1.1.4, jpeg-6b ), but configure does not
find the libraries !

Here are the related lines, generated by ./configure :

--------------- start ----------------

checking for jpeg_CreateDecompress in -ljpeg… no
configure: warning:
*** Unable to find JPEG library (http://www.ijg.org/)

configure: warning: JPG image loading disabled
checking for png_create_read_struct in -lpng… no
configure: warning:
*** Unable to find PNG library
(http://www.libpng.org/pub/png/libpng.html)

checking for uncompress in -lz… yes
configure: warning: PNG image loading disabled

--------------- end ----------------

I checked and those libraries are in /usr/local/lib ( as all other SDL
libraries ).
Here is the related content of this directory :

libbz2.a
libjpeg.a
libpng. -> libpng12.0.1.2.4.
libpng.3. -> libpng12.0.1.2.4.
libpng.3.1.2.4. -> libpng12.0.1.2.4.
libpng.a -> libpng12.a
libpng12.0.1.2.4.dylib
libpng12.0.dylib -> libpng12.0.1.2.4.dylib
libpng12.a
libpng12.dylib -> libpng12.0.dylib
libz.a
pkgconfig (DIR)

and in pkgconfig :
libpng.pc -> libpng12.pc
libpng12.pc

I don’t understand why configure script does not find libpng & libjpeg !
/usr/local/lib is in LD_LIBRARY_PATH and I tried --libdir=/usr/local but
it didn’t change anything.

I then modified Makefile and added manually -DLOAD_JPG -DLOAD_PNG to
CFLAGS and -lpng -ljpeg to LIBS and it compiled perfectly, but I still
got an error at link time :

--------------- start ----------------
/bin/sh ./libtool --mode=link gcc -g -O2 -I/usr/local/include
-I/usr/local/include/SDL -D_THREAD_SAFE
-F/System/Library/Frameworks/Carbon.framework
-F/System/Library/Frameworks/Cocoa.framework -DLOAD_BMP -DLOAD_GIF
-DLOAD_LBM -DLOAD_PCX -DLOAD_PNM -DLOAD_TGA -DLOAD_JPG -DLOAD_PNG
-DLOAD_TIF -DLOAD_XPM -o showimage showimage.o libSDL_image.la
-L/usr/local/lib -lSDLmain -lSDL -ljpeg -lpng -ltiff -framework OpenGL
-framework AGL -framework IOKit -framework Carbon -framework Cocoa
gcc -g -O2 -I/usr/local/include -I/usr/local/include/SDL -D_THREAD_SAFE
-F/System/Library/Frameworks/Carbon.framework
-F/System/Library/Frameworks/Cocoa.framework -DLOAD_BMP -DLOAD_GIF
-DLOAD_LBM -DLOAD_PCX -DLOAD_PNM -DLOAD_TGA -DLOAD_JPG -DLOAD_PNG
-DLOAD_TIF -DLOAD_XPM -o showimage showimage.o .libs/libSDL_image.a
-L/usr/local/lib -lSDLmain -lSDL -lSDLmain -lSDL -ljpeg -lpng -ltiff
-L/usr/local/lib -lSDLmain -lSDL -ljpeg -lpng -ltiff -framework OpenGL
-framework AGL -framework IOKit -framework Carbon -framework Cocoa
ld: table of contents for archive: /usr/local/lib/libjpeg.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libpng.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libjpeg.a is out of
date; rerun ranlib(1) (can’t load from it)
ld: table of contents for archive: /usr/local/lib/libpng.a is out of
date; rerun ranlib(1) (can’t load from it)
--------------- end ----------------

I then tried to run ranlib on each of the specified libraries, but it
didn’t change anything…

Can someone help me ?

Thanks.


Daniel Morais


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl