配置OpenCV
在新建的QT工程中的.pro文件中添加如下配置代码
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_highgui \
-lopencv_imgproc \
完成以上步骤后按理应该是能成功的,但是运行时发现会出现如下的错误。
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libjpeg.8.dylib
in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Reference:
http://blog.csdn.net/libaineu2004/article/details/46234079
http://blog.csdn.net/tianzhaixing2013/article/details/52077064