在配置完opencv后的qt出现error: cannot find -lQt5Cored

时间:2022-04-11 23:16:17
error: cannot find -lQt5Cored
error: error: ld returned 1 exit status

main.cpp
#include <QCoreApplication>
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    //声明IplImage指针
    IplImage * pImg;
    //载入图片
    pImg=cvLoadImage("C:\\Users\\Public\\Pictures\\Sample Pictures\\113.jpg",1);
    //创建窗口
    cvNamedWindow("Image",1);
    //显示图像
    cvShowImage("Image",pImg);
    //等待按键
    cvWaitKey(0);
    //销毁窗口
    cvDestroyWindow("Image");
    //释放图像
    cvReleaseImage(&pImg);

    return a.exec();
}


求大神解答

2 个解决方案

#1


编译器用错没有

#2


error: cannot find -lQt5Cored
Qt版本对吗??Qt5一般用这个QApplication

#1


编译器用错没有

#2


error: cannot find -lQt5Cored
Qt版本对吗??Qt5一般用这个QApplication