error adding symbols: DSO missing from command line


:-1: error: init_box_selector.o: undefined reference to symbol '_ZN2cv9rectangleERKNS_17_InputOutputArrayENS_6Point_IiEES4_RKNS_7Scalar_IdEEiii'

/usr/local/lib/libopencv_imgproc.so.3.0:-1: error: error adding symbols: DSO missing from command line

error adding symbols: DSO missing from command line 编译错误问题解决办法:

     直接指定包含库的路径和库的名称

pro文件添加:

LIBS += `pkg-config opencv --cflags --libs`
LIBS += /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_core.so

你可能感兴趣的:(opencv基础)