一般情况下工程配置如下:
INCLUDEPATH += /usr/local/include/opencv LIBS += `pkg-config opencv --libs`
但如果出现各种有关undefined reference to `av_XXXX'的问题,尝试加一句
LIBS+=-L/usr/local/lib\
-lavutil
即:
INCLUDEPATH+=/usr/local/include/opencv LIBS+=`pkg-configopencv--libs` LIBS+=-L/usr/local/lib\ -lavutil