PNG and compiling SDL_Image on OSX

[excuse me if inquiries related to SDL_image do not belong on this list]

I have been looking at the SDL_image source, namely the project builder
files for building it on Mac OS X. Using SDL_image.pbproj, the
framework compiles without problem. however, trying to compile the
IMG_png. c file in a new project, i get errors related to png.h,
referenced within IMG_png.c

this is a rather obscure question, and not exactly fitting on this
list, but i wonder if anyone knows why IMG_png.c compiles without
problem in SDL_image.pbproj? I cannot locate libpng or png.h anywhere
on my system, and it baffles me that it compiles without error for
SDL_image.pbproj

Hi,

You should have png.h in the following directory:

SDL_image-1.2.3/PBProjects/graphics/include/png.h

The reason why you get the errors is probably down to the way your
environment is set-up. If you open the project file for SDL_image and on the
"Project" menu select “Edit Active Target” you will see the preferences for
the current target. The area of interest for you is the Build Settings tab
and scroll down to the search paths box. In there you should see that the
project has the graphics/include path added for includes as well as the
graphics/lib for the libraries.

When you build your application it searches these paths for the header files
etc… and builds against them hence your project can’t find the png.h file
and this one can.

Hope this makes sense.

Regards,

Lee—
Lee Weekes
lee.weekes at densitron.co.uk
Densitron Technologies Plc

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
john philip
Sent: 03 July 2003 23:44
To: sdl at libsdl.org
Subject: [SDL] PNG and compiling SDL_Image on OSX

[excuse me if inquiries related to SDL_image do not belong on this list]

I have been looking at the SDL_image source, namely the project builder
files for building it on Mac OS X. Using SDL_image.pbproj, the
framework compiles without problem. however, trying to compile the
IMG_png. c file in a new project, i get errors related to png.h,
referenced within IMG_png.c

this is a rather obscure question, and not exactly fitting on this
list, but i wonder if anyone knows why IMG_png.c compiles without
problem in SDL_image.pbproj? I cannot locate libpng or png.h anywhere
on my system, and it baffles me that it compiles without error for
SDL_image.pbproj


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