Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Hi all, in these days i tried to configure qtcreator to work with opencv but i couldn't find a solution.
i wanted to create a programm that opens a webcam and show it in a qt Widget.
I am new to qt and opencv (not to c++) so i would like if you tell me what to do step by step.
Sorry for my bad english :/ i hope you can help me.
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
I havn't a creator 5.0.1 only 2.6.2 unfortunatelly. Further you don't have to configure anything in Qt Creator. Only "configure" the pro file right, that the libraries can be found.
What have you tried? What error do you get?
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
i have tried almost all the code i found in internet and.
here's my .pro:
Quote:
FORMS += mainwindow.ui
INCLUDEPATH += C:\opencv\build\include
LIBS +=-LC:\opencv\build\x86\mingw\lib\
-lopencv_calib3d243\
-lopencv_contrib243 \
-lopencv_core243\
-lopencv_features2d243\
-lopencv_flann243\
-lopencv_gpu243\
-lopencv_highgui243\
-lopencv_imgproc243\
-lopencv_legacy243\
-lopencv_ml243\
-lopencv_nonfree243\
-lopencv_objdetect243\
-lopencv_photo243\
-lopencv_stitching243\
-lopencv_ts243\
-lopencv_video243\
-lopencv_videostab243
if i create a new project and add what i wrote to my .pro the app doesnt start and gives this error "The program has unexpectedly finished."
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
So it does start. Then it is not a problem with Qt Creator. Use a debugger and see where the application crashes.
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
ok, i created a new console project and with the .pro i pasted before all worked fine, but if i create a new gui application it gaves that error message..
Don't you know what to write into the .pro file to make all opencv project work ??
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Quote:
Originally Posted by
marcocadei
Don't you know what to write into the .pro file to make all opencv project work ??
C&P dind't helped you much, why do you think it would now? Use a debugger and look at the backtrace to see where the programm crashes.
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
ok, i think i have another problem now: even if i make a new gui project and run it gives me that error and if i debug it says :
"C:\Users\Marco Cadei\Desktop\prova-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\Makefile.Debug:229: warning: overriding recipe for target `ui_mainwindow.h'
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Fine and what is my crystal ball supposed to say now? :confused:
Try clean the project, rerun qmake and build the project again.
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Ok, now it disappeared.
new error: qmainwindow: no suche file or directory
do you know how to fix this ?
(really thanks for your help, i'm really a greehorn )
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Quote:
Originally Posted by
marcocadei
(really thanks for your help, i'm really a greehorn )
I've noticed that;) I can't tell you what causes that error, because you have to be a little bit more elaborate. How does the line looks like which throws that error? I guess you should write "#include <QMainWindow>".
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
the error is on the line #include <QMainWindow>
i only created a new gui project (i didn't write anything)
i've never seen this error..
Re: Qt Creator 5.0.1 and OpenCv 2.4.3 mingw x86
Sorry but i have to exit, can u tell me your email address ? (thanks again, see you soon ;) )