Compile C program with libpng on Mac OS X

I have a small utility that I wrote in C that uses libpng. On linux, I just install libpng-dev and do "gcc myapp.c / usr / lib / libpng.so -o myapp". On Mac OS X, I have Xcode tools installed, which I believe include libpng. What am I referring to, and do I need to specify an inclusion path for png.h?

+3
source share
1 answer

Try / usr / X11 / include / png.h - you will find libs in .. / lib (or / usr / X11 / lib).

EDIT Mavericks doesn't seem to exist anymore. You may need to use homebrew or MacPorts to install Libpng.

+8
source

Source: https://habr.com/ru/post/1796144/


All Articles