Bonjour tout le monde,
J'ai un problème de linkage d'OpenCV, j'utilise les librairies static (.a), et je n'arrive pas à faire le linkage dans le fichier (.pro), est ce que quelqu'un a une idée? Je vous remercie d'avance.
Le fichier .PRO:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Test target.files = Test target.path = /home/root INSTALLS += target TARGET = Test TEMPLATE = app #INCLUDEPATH += "/usr/local/include/opencv" "/usr/local/include/opencv2" #LIBS += -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann INCLUDEPATH += "/opt/opencv2.3/include" "/opt/opencv2.3/include/opencv" "/opt/opencv2.3/include/opencv2" LIBS += "-L/opt/opencv2.3/lib" -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann SOURCES += main.cpp \ mainwindow.cpp \ Test2.cpp HEADERS += mainwindow.h FORMS += mainwindow.ui
et voici les erreurs que ça génére:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_core.a when searching for -lopencv_core make: Leaving directory `/home/bentaleb/workspace_Qt/Test-build-desktop-Qt_4_8_1_in_PATH__System__Release' /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_imgproc.a when searching for -lopencv_imgproc /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_highgui.a when searching for -lopencv_highgui /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_ml.a when searching for -lopencv_ml /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_video.a when searching for -lopencv_video /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_features2d.a when searching for -lopencv_features2d /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_calib3d.a when searching for -lopencv_calib3d /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_objdetect.a when searching for -lopencv_objdetect /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_contrib.a when searching for -lopencv_contrib /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_legacy.a when searching for -lopencv_legacy /usr/bin/ld: skipping incompatible /opt/opencv2.3/lib/libopencv_flann.a when searching for -lopencv_flann
Partager