0

I have tried the suggestions in this link with no luck.

<png.h> not found in mac os X mavericks

I am currently running OS X 10.11.3 and am using homebrew to install all the packages I need and my libpng has the same paths as the link above.

I installed libpng and zlib but when running my makefile with clang++ and -lpng I get the error

png.h file not found

I am not sure how to link png.h with the compiler without having to add extra flags in the makefile (I don't want to do this because my university uses svn and the makefile has to work on my personal computer and our linux workstations which don't need the extra flags).

Any advice is appreciated.

Community
  • 1
  • 1
  • If it can't find `png.h` the problem is not linking but rather the `include file search path`. Homebrew will have installed in `/usr/local/Cellar/libpng/somewhere`, so go in your Build Settings and add the `Include/Header search path` as `/usr/local/Cellar/libpng` **with the recursive option**.- i.e. with double asterisks – Mark Setchell Jan 30 '16 at 21:56
  • See the blue box on this answer for where you need to make changes... http://stackoverflow.com/a/34341219/2836621 – Mark Setchell Jan 30 '16 at 22:04

0 Answers0