Linking OpenCV to Qt Creator

后端 未结 2 1659
我在风中等你
我在风中等你 2021-01-27 02:26

I\'m trying to use opencv 4 in QT creator, I\'m working on Mac but I can\'t be able to link the library, I always have a error like on picture 2.

ple

2条回答
  •  鱼传尺愫
    2021-01-27 03:11

    So, I have a solution here, I have install the OpenCV 4. In

    /usr/local/Cellar/opencv/4.2.0_1/lib/pkgconfig

    I have a opencv4.pc not opencv.pc and the "opencv development package not found" error came from here.

    Edit your .pro file with

    QT_CONFIG -= no-pkg-config
    CONFIG  += link_pkgconfig
    PKGCONFIG += opencv4 
    

    note that it's opencv4.

    after you have to configure the Build Environment in Qt Creator normally.

提交回复
热议问题