【发布时间】:2012-09-19 18:47:12
【问题描述】:
我正在尝试使用 C++ 进行一些图像处理。我目前正在使用 OS X 10.7 并仅使用 makefile 和终端编写我的代码。我已经用macports安装了libpng,但还是无法链接。
g++ main.cpp -llibpng -O2 -o ImageManipulator
g++ main.cpp -lpng -O2 -o ImageManipulator
都失败了:
ld: library not found for -lpng
和
ld: library not found for -llibpng
有人知道如何在 OS X 上为此调用 g++ 吗?
【问题讨论】: