qt opencv Makefile或者 .pro 库调用顺序和规则
HEADERS += mainwindow.h \
cameraworker.h
HEADERS += /usr/local/include \
/usr/local/include/opencv \
/usr/local/include/opencv2 \
/usr/local/include/raspicam
FORMS += mainwindow.ui
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -ldl -lm -lrt
LIBS +=/usr/local/lib/libopencv_shape.a
LIBS += /usr/local/lib/libopencv_stitching.a
LIBS += /usr/local/lib/libopencv_objdetect.a
LIBS += /usr/local/lib/libopencv_superres.a
LIBS +=/usr/local/lib/libopencv_videostab.a
LIBS += /usr/local/lib/libopencv_calib3d.a
LIBS +=/usr/local/lib/libopencv_features2d.a
LIBS += /usr/local/lib/libopencv_flann.a
LIBS += /usr/local/lib/libopencv_highgui.a
LIBS += /usr/local/lib/libopencv_ml.a
LIBS += /usr/local/lib/libopencv_photo.a
LIBS += /usr/local/lib/libopencv_video.a
LIBS += /usr/local/lib/libopencv_videoio.a
LIBS +=/usr/local/lib/libopencv_imgcodecs.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/liblibjpeg.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/liblibwebp.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/liblibpng.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/liblibtiff.a
LIBS +=/usr/local/share/OpenCV/3rdparty/lib/liblibjasper.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/libIlmImf.a
LIBS += /usr/local/lib/libopencv_imgproc.a
LIBS +=/usr/local/lib/libopencv_core.a
LIBS += /usr/local/share/OpenCV/3rdparty/lib/libzlib.a
LIBS +=/usr/local/share/OpenCV/3rdparty/lib/libtegra_hal.a
Makefile :
CFLAGS += -I./usr/include/opencv
CFLAGS += -I./usr/inc/opencv/opencv2
CFLAGS += -I./usr/include
LDFLAGS += -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d
LDFLAGS += -lopencv_flann -lopencv_highgui -lopencv_ml -lopencv_photo -lopencv_video -lopencv_videoio -lopencv_imgcodecs
LDFLAGS += -llibjpeg -llibwebp -llibpng -llibtiff -llibjasper -lIlmImf -lopencv_imgproc -lopencv_core
LDFLAGS += -lzlib -lrt -lpthread -pthread -lm -ldl