I’m trying to do some image processing using C++. I’m currently using OS X 10.7 and writing my code simply using a makefile and the terminal. I’ve used macports to install libpng but I still can’t link with it.
g++ main.cpp -llibpng -O2 -o ImageManipulator
g++ main.cpp -lpng -O2 -o ImageManipulator
both fail with:
ld: library not found for -lpng
and
ld: library not found for -llibpng
does anyone know how to call g++ for this on OS X?
I dont think macports does add its lib directory to the default path searched by gcc. Try