Intégrer OpenCV : fonction cvCreateCameraCapture non trouvée à l'édition des liens
Bonjour à tous,
Pourriez-vous m'aider, j'utilise qtcreator sous windows, voilà j'ai ma classe qui est
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| #include "mainwindow.h"
#include <QApplication>
#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv/cv.h"
#include "opencv/highgui.h"
#include "opencv/cxcore.h"
#include "opencv2/videoio/videoio_c.h"
using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
cout << "Hello World!" << endl;
cv::Mat mat;
CvCapture *capture;
capture = cvCreateCameraCapture( CV_CAP_ANY );
cvWaitKey(0);
MainWindow camera;
camera.show();
return app.exec();
} |
mais cela me retourne
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| + -Wl,-subsystem,windows -mthreads -o debug\Double_video.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -lmingw32 -LC:/Qt/5.5/mingw492_32/lib -lqtmaind -lshell32 -LC:\opencv-build\bin -lopencv_core310 -lopencv_highgui310 -lopencv_imgproc310 -lopencv_features2d310 -lopencv_calib3d310 -lQt5MultimediaWidgetsd -lQt5Multimediad -lQt5Widgetsd -lQt5Guid -lQt5Networkd -lQt5Cored
debug/main.o: In function `Z5qMainiPPc':
C:\Users\user\Documents\build-Double_video-Desktop_Qt_5_5_1_MinGW_32bit-Debug/../Double_video/main.cpp:22: undefined reference to `cvCreateCameraCapture'
collect2.exe: error: ld returned 1 exit status
Makefile.Debug:81: recipe for target 'debug\Double_video.exe' failed
mingw32-make[1]: *** [debug\Double_video.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/user/Documents/build-Double_video-Desktop_Qt_5_5_1_MinGW_32bit-Debug'
makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
13:52:03: Le processus "C:\Qt\Tools\mingw492_32\bin\mingw32-make.exe" s'est terminé avec le code 2.
Erreur lors de la compilation/déploiement du projet Double_video (kit : Desktop Qt 5.5.1 MinGW 32bit)
When executing step "Make"
13:52:03: Temps écoulé : 00:04. |
voici le .pro
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| #-------------------------------------------------
#
# Project created by QtCreator 2015-12-13T19:40:17
#
#-------------------------------------------------
QT += core gui multimedia multimediawidgets
INCLUDEPATH += C:/opencv-build/install/include
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Double_video
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
LIBS += -LC:\\opencv-build\\bin \
libopencv_core310 \
libopencv_highgui310 \
libopencv_imgproc310 \
libopencv_features2d310 \
libopencv_calib3d310 \ |
auriez-vous une idée peut-être que la librairie qui contient la fonction ne fait pas partie de celle incorporer?