# Native Code > برنامه نویسی با C > برنامه نویسی در محیط QT و هم خانواده هایش >  مشکل در کامپایل opencv  برای استفاده در کیوت

## gholami.vahid

سلام دوستان 
من آموزش های کامپایل کردن فایل های سورس opencv  رو از وب سایت های مختلف تست کردم و نتونستم اون رو با کامپایلر mingw  برای کیوت آماده کنم . از دوستانی که اطلاعات در زمینه آموزش برنامه نویسی opencv  بر روی کیوت دارن  ممنون میشم راهنماییم کنید .
من با استفاده از این آموزش http://opencv.ir/forum/viewtopic.php?f=66&t=268    پیش رفتم و زمان  generate  در cmake  با خطا هایی زیر روبرو میشوم 




CMake Warning (dev) in apps/traincascade/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.


CMake Warning (dev) in apps/createsamples/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.


CMake Warning (dev) in apps/annotation/CMakeLists.txt:
  Policy CMP0020 is not set: Automatically link Qt executables to qtmain
  target on Windows.  Run "cmake --help-policy CMP0020" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

----------


## حامد مصافی

اینها خطا نیستند، اخطار هستند. با وجود اخطار ها کامپایل باید صورت گیرد.

----------


## gholami.vahid

آره میدونم اخطار هستند اما نمیدونم وقتی دستور زیر رو اجرا  میکنم تا ۵۰  فقط میره .
E:\Qt.5.2.0\opencv\build>mingw32-make  –j16
ممنون میشم اگه کمکم کنید اخه خیلی لازمش دارم .

----------


## حامد مصافی

کل متن خروجی رو ضمیمه کنید

----------


## gholami.vahid

> کل متن خروجی رو ضمیمه کنید


سلام پیوست شد

----------


## حامد مصافی

من که خطایی ندادم در این خروجی، آخر لاگ هم که پیغام موفقیت هست. ظاهرا همه چیز باید درست باشه.

----------


## gholami.vahid

> من که خطایی ندادم در این خروجی، آخر لاگ هم که پیغام موفقیت هست. ظاهرا همه چیز باید درست باشه.


اره اما  حالا باید cmd رو باز کنیم و به ادرس پوشه build بریم و کد زیر رو بزنیم mingw32-make –j16
این دستور تا 50 بعضی وقتا تا 60 میره و بیشتر از این نمیره تصویر پیوست رو نگاه کنید

----------


## حامد مصافی

این خروجی کامپایل رو هم به صورت کامل بذارید اینجا تا ببینیم

----------


## gholami.vahid

> این خروجی کامپایل رو هم به صورت کامل بذارید اینجا تا ببینیم


منظور این پوشه بود ؟

----------


## حامد مصافی

نه دوست عزیز، منظورم تمامی چیزهاییه که در Command Prompt نمایش داده میشه. در همین پوشه هم محتویات bin رو چک کن

----------


## gholami.vahid

bj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel.
cpp.obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel_
pthreads.cpp.obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/pca.cpp.o
bj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persisten
ce.cpp.obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/rand.cpp.
obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat.cpp.
obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stl.cpp.o
bj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cp
p.obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/tables.cp
p.obj
[ 51%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/types.cpp
.obj
[ 52%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/umatrix.c
pp.obj
[ 52%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernel
s_core.cpp.obj
C:\opencv\sources\modules\core\src\system.cpp: In function 'BOOL cv::DllMain(HIN
STANCE, DWORD, LPVOID)':
C:\opencv\sources\modules\core\src\system.cpp:1013  :13: warning: no previous decl
aration for 'BOOL cv::DllMain(HINSTANCE, DWORD, LPVOID)' [-Wmissing-declarations
]
 BOOL WINAPI DllMain(HINSTANCE, DWORD fdwReason, LPVOID lpReserved)
             ^
[ 52%] Linking CXX shared library ..\..\bin\libopencv_core300d.dll
C:/Qt/Qt5.5.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../.
./i686-w64-mingw32/bin/ld.exe: cannot find -lRunTmChk
collect2.exe: error: ld returned 1 exit status
modules\core\CMakeFiles\opencv_core.dir\build.make  :1286: recipe for target 'bin/
libopencv_core300d.dll' failed
mingw32-make[2]: *** [bin/libopencv_core300d.dll] Error 1
CMakeFiles\Makefile2:1615: recipe for target 'modules/core/CMakeFiles/opencv_cor
e.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


C:\Qt\Qt5.5.0\opencv\Build>mingw32-make  -j16
[  0%] Built target opencv_hal_pch_dephelp
[  1%] Built target opencv_perf_core_pch_dephelp
[  1%] Built target opencv_test_flann_pch_dephelp
[  1%] Built target opencv_imgcodecs_pch_dephelp
[  1%] Built target opencv_test_core_pch_dephelp
[  1%] Built target opencv_core_pch_dephelp
[  1%] Built target opencv_ts_pch_dephelp
[  2%] Built target opencv_flann_pch_dephelp
[  3%] Built target opencv_perf_imgproc_pch_dephelp
[  6%] Built target zlib
[  6%] Built target opencv_highgui_pch_dephelp
[  6%] Built target opencv_videoio_pch_dephelp
[  6%] Built target opencv_imgproc_pch_dephelp
[  6%] Built target opencv_test_imgproc_pch_dephelp
[  7%] Built target opencv_video_pch_dephelp
[ 12%] Built target opencv_perf_video_pch_dephelp
[ 12%] Built target libjasper
[ 13%] [ 15%] Built target opencv_photo_pch_dephelp
Built target opencv_perf_photo_pch_dephelp[ 18%] Built target libjpeg
[ 18%] Built target opencv_test_shape_pch_dephelp


[ 18%] Built target opencv_ml_pch_dephelp[ 18%] [ 18%] Built target opencv_perf_
imgcodecs_pch_dephelp
[ 18%]
[ 18%] [ 18%] Built target opencv_test_ml_pch_dephelpBuilt target opencv_shape_p
ch_dephelp


Built target opencv_test_photo_pch_dephelp[ 20%]
Built target opencv_test_video_pch_dephelpBuilt target opencv_test_imgcodecs_pch
_dephelp


[ 21%] Built target opencv_test_videoio_pch_dephelp
[ 25%] Built target libwebp
[ 25%] Built target opencv_test_superres_pch_dephelp
[ 25%] Built target opencv_perf_videoio_pch_dephelp
[ 25%] Built target opencv_test_highgui_pch_dephelp
[ 25%] [ 25%] Built target opencv_calib3d_pch_dephelpBuilt target opencv_test_ca
lib3d_pch_dephelp


[ 25%] Built target opencv_test_objdetect_pch_dephelp
[ 25%] Built target opencv_perf_calib3d_pch_dephelp
[ 25%] Built target opencv_stitching_pch_dephelp
[ 25%] Built target pch_Generate_opencv_hal
[ 25%] Built target pch_Generate_opencv_core
[ 26%] Built target opencv_perf_superres_pch_dephelp[ 27%] Built target opencv_f
eatures2d_pch_dephelp
[ 27%] Built target opencv_perf_features2d_pch_dephelp


[ 28%] [ 28%] Built target opencv_perf_objdetect_pch_dephelp[ 28%] Built target
opencv_objdetect_pch_dephelp
[ 28%] [ 28%] Built target opencv_videostab_pch_dephelpBuilt target pch_Generate
_opencv_imgcodecs


Built target opencv_superres_pch_dephelp[ 28%]
[ 28%] Built target opencv_test_stitching_pch_dephelp


Built target pch_Generate_opencv_imgproc[ 28%] [ 30%]
Built target opencv_perf_stitching_pch_dephelpBuilt target libpng
[ 30%] Built target pch_Generate_opencv_highgui


[ 30%] Built target opencv_test_features2d_pch_dephelp
[ 30%] Built target pch_Generate_opencv_perf_core
[ 33%] Built target libtiff
[ 33%] Built target pch_Generate_opencv_ts
[ 33%] Built target pch_Generate_opencv_videoio
[ 33%] Built target pch_Generate_opencv_test_flann
[ 33%] Built target pch_Generate_opencv_photo
[ 33%] Built target pch_Generate_opencv_test_ml
[ 33%] Built target pch_Generate_opencv_perf_imgproc
[ 33%] [ 35%] Built target pch_Generate_opencv_perf_video
[ 35%] Built target pch_Generate_opencv_test_imgproc
[ 35%] [ 35%] [ 35%] Built target pch_Generate_opencv_test_photo
Built target pch_Generate_opencv_ml[ 36%] Built target pch_Generate_opencv_flann


Built target pch_Generate_opencv_perf_photoBuilt target pch_Generate_opencv_test
_core


[ 37%] Built target pch_Generate_opencv_test_video


[ 36%] [ 37%] Built target pch_Generate_opencv_test_imgcodecs
[ 37%] Built target pch_Generate_opencv_shape
[ 38%] Built target pch_Generate_opencv_perf_videoio
Built target pch_Generate_opencv_video
[ 43%] Built target pch_Generate_opencv_perf_imgcodecs
[ 43%] [ 43%] Built target pch_Generate_opencv_test_shape[ 43%]
Built target IlmImf[ 43%] Built target pch_Generate_opencv_objdetect
Built target pch_Generate_opencv_test_videoio
[ 43%]
[ 43%] Built target pch_Generate_opencv_test_highgui
[ 43%] Built target pch_Generate_opencv_calib3d
[ 43%] Built target pch_Generate_opencv_perf_superres
[ 43%] Built target pch_Generate_opencv_perf_objdetect[ 43%] [ 45%] [ 45%] Built
 target pch_Generate_opencv_test_superres
[ 45%] Built target pch_Generate_opencv_features2d


[ 45%] Built target pch_Generate_opencv_test_calib3d
[ 45%] Built target pch_Generate_opencv_superresBuilt target pch_Generate_opencv
_test_features2d


[ 46%] Built target pch_Generate_opencv_perf_calib3d
Built target pch_Generate_opencv_test_objdetectBuilt target pch_Generate_opencv_
perf_features2d
[ 47%] Built target pch_Generate_opencv_perf_stitching


[ 47%] Built target pch_Generate_opencv_stitching
[ 47%] Built target pch_Generate_opencv_test_stitching
[ 47%] Built target opencv_hal
[ 47%] Built target pch_Generate_opencv_videostab
[ 47%] Linking CXX shared library ..\..\bin\libopencv_core300d.dll
C:/Qt/Qt5.5.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../.
./i686-w64-mingw32/bin/ld.exe: cannot find -lRunTmChk
collect2.exe: error: ld returned 1 exit status
modules\core\CMakeFiles\opencv_core.dir\build.make  :1286: recipe for target 'bin/
libopencv_core300d.dll' failed
mingw32-make[2]: *** [bin/libopencv_core300d.dll] Error 1
CMakeFiles\Makefile2:1615: recipe for target 'modules/core/CMakeFiles/opencv_cor
e.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


C:\Qt\Qt5.5.0\opencv\Build>
C:\Qt\Qt5.5.0\opencv\Build>mingw32-make  -j16
[  0%] [  0%] Built target opencv_highgui_pch_dephelp
Built target opencv_core_pch_dephelp[  2%]
[  3%] [  3%] Built target opencv_imgcodecs_pch_dephelp
[  3%] [  3%] Built target opencv_ts_pch_dephelp
Built target opencv_perf_core_pch_dephelpBuilt target zlib
[ 10%] [ 10%] [ 10%] Built target opencv_videoio_pch_dephelp[ 11%] Built target
opencv_perf_imgproc_pch_dephelp[ 13%] Built target libjpeg
Built target libjasper
[ 13%] Built target opencv_test_core_pch_dephelp
[ 18%] [ 10%]


Built target opencv_hal_pch_dephelp[ 18%] Built target opencv_test_imgproc_pch_d
ephelp




[ 12%] Built target opencv_imgproc_pch_dephelpBuilt target libwebpBuilt target o
pencv_flann_pch_dephelp
[ 18%] Built target opencv_test_ml_pch_dephelp




Built target opencv_test_flann_pch_dephelp[ 20%] Built target opencv_photo_pch_d
ephelp
[ 18%]
[ 21%] [ 22%] [ 22%] [ 23%] Built target opencv_perf_photo_pch_dephelpBuilt targ
et opencv_video_pch_dephelpBuilt target opencv_test_photo_pch_dephelp
[ 23%] Built target opencv_perf_video_pch_dephelp




[ 23%] [ 25%] Built target opencv_test_videoio_pch_dephelp
[ 23%] [ 25%] Built target opencv_shape_pch_dephelp[ 25%] Built target opencv_ml
_pch_dephelp
[ 25%] Built target opencv_perf_objdetect_pch_dephelp
[ 26%] [ 26%]
[ 26%] Built target opencv_test_objdetect_pch_dephelp
Built target opencv_test_highgui_pch_dephelp
Built target opencv_test_video_pch_dephelpBuilt target opencv_test_imgcodecs_pch
_dephelp


Built target opencv_perf_imgcodecs_pch_dephelp[ 27%] Built target opencv_superre
s_pch_dephelp
Built target opencv_objdetect_pch_dephelp


[ 23%] Built target opencv_test_shape_pch_dephelpBuilt target opencv_perf_videoi
o_pch_dephelp[ 28%]


Built target opencv_perf_superres_pch_dephelp[ 28%] Built target opencv_test_sup
erres_pch_dephelp


[ 28%] Built target opencv_test_features2d_pch_dephelp
[ 28%] Built target opencv_features2d_pch_dephelp[ 28%] Built target opencv_perf
_features2d_pch_dephelp
[ 28%] Built target opencv_calib3d_pch_dephelp


[ 28%] [ 28%] Built target opencv_perf_stitching_pch_dephelp
Built target opencv_perf_calib3d_pch_dephelp[ 28%] Built target opencv_test_cali
b3d_pch_dephelp
[ 28%] Built target opencv_stitching_pch_dephelp


[ 28%] Built target opencv_test_stitching_pch_dephelp
[ 28%] Built target pch_Generate_opencv_hal
[ 32%] Built target libtiff
[ 32%] Built target opencv_videostab_pch_dephelp
[ 32%] [ 32%] Built target pch_Generate_opencv_imgcodecs
Built target pch_Generate_opencv_test_core[ 33%] Built target pch_Generate_openc
v_ts[ 33%]
Built target pch_Generate_opencv_videoio
[ 33%]
[ 33%] Built target libpng[ 33%]
[ 33%] Built target pch_Generate_opencv_perf_imgproc
[ 35%] Built target pch_Generate_opencv_perf_core
[ 35%] Built target pch_Generate_opencv_highgui[ 35%] Built target pch_Generate_
opencv_test_flann
[ 33%] [ 35%]
Built target pch_Generate_opencv_flannBuilt target pch_Generate_opencv_imgproc
[ 36%] Built target pch_Generate_opencv_perf_photo


Built target pch_Generate_opencv_ml[ 36%]
[ 36%] [ 36%] Built target pch_Generate_opencv_photo
Built target pch_Generate_opencv_perf_video
Built target pch_Generate_opencv_core[ 36%] [ 42%] Built target IlmImf


[ 42%] [ 43%] [ 43%] [ 43%] Built target pch_Generate_opencv_test_imgcodecs
Built target pch_Generate_opencv_test_ml[ 43%]
[ 43%] Built target pch_Generate_opencv_test_shapeBuilt target pch_Generate_open
cv_test_imgprocBuilt target pch_Generate_opencv_test_video
Built target pch_Generate_opencv_test_photo




[ 43%] Built target pch_Generate_opencv_test_objdetect
[ 43%] Built target pch_Generate_opencv_videoBuilt target pch_Generate_opencv_pe
rf_imgcodecs[ 43%]
[ 43%] [ 43%] Built target pch_Generate_opencv_perf_videoioBuilt target pch_Gene
rate_opencv_objdetect
[ 43%] Built target pch_Generate_opencv_test_highgui




[ 43%] [ 45%] Built target pch_Generate_opencv_superres
[ 45%] [ 45%] Built target pch_Generate_opencv_perf_objdetectBuilt target pch_Ge
nerate_opencv_shape


Built target pch_Generate_opencv_test_superresBuilt target pch_Generate_opencv_p
erf_superres[ 45%] Built target pch_Generate_opencv_calib3d




[ 45%] [ 45%] Built target pch_Generate_opencv_stitching
Built target pch_Generate_opencv_test_videoio[ 45%]
[ 46%] Built target pch_Generate_opencv_test_calib3d
[ 46%] Built target pch_Generate_opencv_perf_features2d[ 45%] Built target pch_G
enerate_opencv_test_features2dBuilt target pch_Generate_opencv_perf_calib3d
[ 46%] Built target pch_Generate_opencv_test_stitching




[ 47%] Built target pch_Generate_opencv_features2dBuilt target pch_Generate_open
cv_videostab
[ 47%]
Built target pch_Generate_opencv_perf_stitching
[ 47%] Built target opencv_hal
[ 47%] Linking CXX shared library ..\..\bin\libopencv_core300d.dll
C:/Qt/Qt5.5.0/Tools/mingw492_32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../.
./i686-w64-mingw32/bin/ld.exe: cannot find -lRunTmChk
collect2.exe: error: ld returned 1 exit status
modules\core\CMakeFiles\opencv_core.dir\build.make  :1286: recipe for target 'bin/
libopencv_core300d.dll' failed
mingw32-make[2]: *** [bin/libopencv_core300d.dll] Error 1
CMakeFiles\Makefile2:1615: recipe for target 'modules/core/CMakeFiles/opencv_cor
e.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


C:\Qt\Qt5.5.0\opencv\Build>mingw32-make  -j16

----------


## حامد مصافی

اعلان زیر را به فرمان cmake اضافه کن و نتیجه رو تست کن

WITH_IPP=OFF

----------


## gholami.vahid

> اعلان زیر را به فرمان cmake اضافه کن و نتیجه رو تست کن
> 
> WITH_IPP=OFF


متاسفانه جواب نداد . خطایی که داد

 subscript is below array bounds [-Warray-bounds]
     sz[dims-1] *= esz;
                      ^
[ 30%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernel
s_core.cpp.obj
Linking CXX shared library ..\..\bin\libopencv_core300.dll
[ 30%] Built target opencv_core
Scanning dependencies of target opencv_highgui_pch_dephelp_automoc
[ 30%] Automoc for target opencv_highgui_pch_dephelp
[ 30%] Built target opencv_highgui_pch_dephelp_automoc
[ 31%] Generating opencv_highgui_pch_dephelp.cxx
Scanning dependencies of target opencv_highgui_pch_dephelp
[ 31%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp
.dir/opencv_highgui_pch_dephelp.cxx.obj
[ 31%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp
.dir/opencv_highgui_pch_dephelp_automoc.cpp.obj
Linking CXX static library ..\..\lib\libopencv_highgui_pch_dephelp.a
[ 31%] Built target opencv_highgui_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_highgui
[ 31%] Generating precomp.hpp
[ 31%] Generating precomp.hpp.gch/opencv_highgui_Release.gch
[ 31%] Built target pch_Generate_opencv_highgui
[ 31%] Generating opencv_imgproc_pch_dephelp.cxx
Scanning dependencies of target opencv_imgproc_pch_dephelp
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp
.dir/opencv_imgproc_pch_dephelp.cxx.obj
Linking CXX static library ..\..\lib\libopencv_imgproc_pch_dephelp.a
[ 31%] Built target opencv_imgproc_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_imgproc
[ 31%] Generating precomp.hpp
[ 31%] Generating precomp.hpp.gch/opencv_imgproc_Release.gch
[ 31%] Built target pch_Generate_opencv_imgproc
[ 31%] Generating opencl_kernels_imgproc.cpp, opencl_kernels_imgproc.hpp
Scanning dependencies of target opencv_imgproc
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/acc
um.cpp.obj
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/app
rox.cpp.obj
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/ble
nd.cpp.obj
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/can
ny.cpp.obj
[ 31%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cla
he.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/col
or.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/col
ormap.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/con
nectedcomponents.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/con
tours.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/con
vhull.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cor
ner.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cor
nersubpix.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/dem
osaicing.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/der
iv.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/dis
transform.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/dra
wing.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/emd
.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/fea
tureselect.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/fil
ter.cpp.obj
[ 32%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/flo
odfill.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gab
or.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gen
eralized_hough.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/geo
metry.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gra
bcut.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/her
shey_fonts.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/his
togram.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hou
gh.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/img
warp.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/int
ersection.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/lin
efit.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/lsd
.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/mat
chcontours.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/min
_enclosing_triangle.cpp.obj
[ 33%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/mom
ents.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/mor
ph.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/pha
secorr.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/pyr
amids.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/rot
calipers.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sam
plers.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/seg
mentation.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sha
pedescr.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smo
oth.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sub
division2d.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sum
pixels.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/tab
les.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/tem
plmatch.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/thr
esh.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/und
istort.cpp.obj
[ 34%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/uti
ls.cpp.obj
[ 36%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/opencl_
kernels_imgproc.cpp.obj
Linking CXX shared library ..\..\bin\libopencv_imgproc300.dll
[ 36%] Built target opencv_imgproc
[ 36%] Generating opencv_imgcodecs_pch_dephelp.cxx
Scanning dependencies of target opencv_imgcodecs_pch_dephelp
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dep
help.dir/opencv_imgcodecs_pch_dephelp.cxx.obj
Linking CXX static library ..\..\lib\libopencv_imgcodecs_pch_dephelp.a
[ 36%] Built target opencv_imgcodecs_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_imgcodecs
[ 36%] Generating precomp.hpp
[ 36%] Generating precomp.hpp.gch/opencv_imgcodecs_Release.gch
[ 36%] Built target pch_Generate_opencv_imgcodecs
Scanning dependencies of target opencv_imgcodecs
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/loadsave.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/utils.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_base.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_bmp.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_exr.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_gdal.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_hdr.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_jpeg.cpp.obj
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp: In member fun
ction 'virtual bool cv::JpegEncoder::write(const cv::Mat&, const std::vector<int
>&)':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp:556:10: warnin
g: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp: In member fun
ction 'virtual bool cv::JpegDecoder::readHeader()':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp:216:10: warnin
g: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp: In member fun
ction 'virtual bool cv::JpegDecoder::readData(cv::Mat&)':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_jpeg.cpp:394:10: warnin
g: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_jpeg2000.cpp.obj
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_png.cpp.obj
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp: In member func
tion 'virtual bool cv::PngDecoder::readHeader()':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp:143:10: warning
: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp: In member func
tion 'virtual bool cv::PngDecoder::readData(cv::Mat&)':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp:227:10: warning
: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp: In member func
tion 'virtual bool cv::PngEncoder::write(const cv::Mat&, const std::vector<int>&
)':
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp:345:11: warning
: variable 'f' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     FILE* f = 0;
           ^
C:\Qt\Qt5.5.0\opencv\sources\modules\imgcodecs\src  \grfmt_png.cpp:348:10: warning
: variable 'result' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     bool result = false;
          ^
[ 36%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_pxm.cpp.obj
[ 37%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_sunras.cpp.obj
[ 37%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_tiff.cpp.obj
[ 37%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/grfmt_webp.cpp.obj
[ 37%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/bitstrm.cpp.obj
[ 37%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src
/rgbe.cpp.obj
Linking CXX shared library ..\..\bin\libopencv_imgcodecs300.dll
[ 37%] Built target opencv_imgcodecs
Scanning dependencies of target opencv_highgui_automoc
[ 37%] Automoc for target opencv_highgui
Generating moc_window_QT.cpp
[ 37%] Built target opencv_highgui_automoc
[ 37%] Generating opencv_videoio_pch_dephelp.cxx
Scanning dependencies of target opencv_videoio_pch_dephelp
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp
.dir/opencv_videoio_pch_dephelp.cxx.obj
Linking CXX static library ..\..\lib\libopencv_videoio_pch_dephelp.a
[ 37%] Built target opencv_videoio_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_videoio
[ 37%] Generating precomp.hpp
[ 37%] Generating precomp.hpp.gch/opencv_videoio_Release.gch
[ 37%] Built target pch_Generate_opencv_videoio
Scanning dependencies of target opencv_videoio
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
.cpp.obj
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_images.cpp.obj
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_mjpeg_encoder.cpp.obj
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_mjpeg_decoder.cpp.obj
[ 37%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_cmu.cpp.obj
[ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap
_dshow.cpp.obj
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:122:11: error: ba
se class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-vi
rtual-dtor]
 interface IEnumPIDMap : public IUnknown
           ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:122:11: error: 's
truct IEnumPIDMap' has virtual functions and accessible non-virtual destructor [
-Werror=non-virtual-dtor]
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:139:11: error: ba
se class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-vi
rtual-dtor]
 interface IMPEG2PIDMap : public IUnknown
           ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:139:11: error: 's
truct IMPEG2PIDMap' has virtual functions and accessible non-virtual destructor
[-Werror=non-virtual-dtor]
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:227:11: error: ba
se class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-vi
rtual-dtor]
 interface ISampleGrabberCB : public IUnknown
           ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:227:11: error: 's
truct ISampleGrabberCB' has virtual functions and accessible non-virtual destruc
tor [-Werror=non-virtual-dtor]
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:239:11: error: ba
se class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-vi
rtual-dtor]
 interface ISampleGrabber : public IUnknown
           ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:239:11: error: 's
truct ISampleGrabber' has virtual functions and accessible non-virtual destructo
r [-Werror=non-virtual-dtor]
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:646:7: error: bas
e class 'struct ISampleGrabberCB' has accessible non-virtual destructor [-Werror
=non-virtual-dtor]
 class SampleGrabberCallback : public ISampleGrabberCB{
       ^
cc1plus.exe: some warnings being treated as errors
modules\videoio\CMakeFiles\opencv_videoio.dir\buil  d.make:177: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dsho
w.cpp.obj] Error 1
CMakeFiles\Makefile2:4354: recipe for target 'modules/videoio/CMakeFiles/opencv_
videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2


makefile:135: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


C:\Qt\Qt5.5.0\opencv\Build>mingw32-make

----------


## حامد مصافی

ظاهرا مشکل قبلی حل شده و مشکل جدیدی نمایان شده، اینجا در مورد مشکل جدید توضیح داده، ظاهرا کاربران زیادی این هشدار رو دریافت کردند.
طبق راهنمایی‌های همین لینک در فایل OpenCVCompilerOptions.cmake به دنبال خطی مانند زیر بگردید و پس از یافتن به ابتدای آن یک # اضافه کنید.


add_extra_compiler_option(-Werror=non-virtual-dtor)

----------


## gholami.vahid

جواب نداد . نمیشه یه کیوت دیگه بگیرم  که نیاز به کامپایلر مینگ نباشه . من میخوام سی پلاس کد بزنم و  نیاز به یه فرم خوشکل واسه برنامه پردازش تصویرم دارم . واسه همین میخوام از کیوت استفاده کنم . نمیشه فایلهای  opencv   که برای ویژال استدیو  گرفتم رو استفاده کنم  . حتما باید این opencv زو با مینگ کامپایل کنم . در ضمن سرعت پردازش تصویر برام مهمه . میشه تو این زمینه راهنماییم کنید .

خطایی مجدد

----------


## gholami.vahid

خطای مجدد 


 left operand of comma operator has no effect [-Wunused-value]
     else if(type == MEDIASUBTYPE_I420)  sprintf(tmpStr, "I420");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2202:5: error: 'e
lse' without a previous 'if'
     else sprintf(tmpStr, "OTHER");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2202:10: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else sprintf(tmpStr, "OTHER");
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2202:26: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else sprintf(tmpStr, "OTHER");
                          ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp: In member functi
on 'void videoInput::getVideoPropertyAsString(int, char*)':
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2228:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     if ( prop==VideoProcAmp_Brightness) sprintf(tmpStr, "Brightness");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2228:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     if ( prop==VideoProcAmp_Brightness) sprintf(tmpStr, "Brightness");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2229:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2229:44: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
                                            ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2229:60: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Contrast) sprintf(tmpStr, "Contrast");
                                                            ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2230:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2230:46: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
                                              ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2230:62: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Saturation) sprintf(tmpStr, "Saturation");
                                                              ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2231:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2231:39: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
                                       ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2231:55: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Hue) sprintf(tmpStr, "Hue");
                                                       ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2232:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2232:40: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
                                        ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2232:56: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Gain) sprintf(tmpStr, "Gain");
                                                        ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2233:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2233:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2233:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Gamma) sprintf(tmpStr, "Gamma");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2234:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2234:47: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
                                               ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2234:63: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_ColorEnable) sprintf(tmpStr, "ColorEnable");
                                                               ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2235:5: error: 'e
lse' without a previous 'if'
     else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2235:45: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
                                             ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2235:61: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==VideoProcAmp_Sharpness) sprintf(tmpStr, "Sharpness");
                                                             ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2236:5: error: 'e
lse' without a previous 'if'
     else sprintf(tmpStr, "%u",prop);
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2236:10: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else sprintf(tmpStr, "%u",prop);
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2236:26: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else sprintf(tmpStr, "%u",prop);
                          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2236:31: warning:
 right operand of comma operator has no effect [-Wunused-value]
     else sprintf(tmpStr, "%u",prop);
                               ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp: In member functi
on 'void videoInput::getCameraPropertyAsString(int, char*)':
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2311:35: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     if ( prop==CameraControl_Pan) sprintf(tmpStr, "Pan");
                                   ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2311:51: warning:
 left operand of comma operator has no effect [-Wunused-value]
     if ( prop==CameraControl_Pan) sprintf(tmpStr, "Pan");
                                                   ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2312:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2312:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2312:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Tilt) sprintf(tmpStr, "Tilt");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2313:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2313:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2313:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Roll) sprintf(tmpStr, "Roll");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2314:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2314:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2314:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Zoom) sprintf(tmpStr, "Zoom");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2315:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2315:45: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
                                             ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2315:61: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Exposure) sprintf(tmpStr, "Exposure");
                                                             ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2316:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2316:41: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2316:57: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Iris) sprintf(tmpStr, "Iris");
                                                         ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2317:5: error: 'e
lse' without a previous 'if'
     else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2317:42: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
                                          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2317:58: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else if ( prop==CameraControl_Focus) sprintf(tmpStr, "Focus");
                                                          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2318:5: error: 'e
lse' without a previous 'if'
     else sprintf(tmpStr, "%u",prop);
     ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2318:10: error: '
sprintf_instead_use_StringCbPrintfA_or_StringCchPr  intfA' was not declared in thi
s scope
     else sprintf(tmpStr, "%u",prop);
          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2318:26: warning:
 left operand of comma operator has no effect [-Wunused-value]
     else sprintf(tmpStr, "%u",prop);
                          ^
C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow.cpp:2318:31: warning:
 right operand of comma operator has no effect [-Wunused-value]
     else sprintf(tmpStr, "%u",prop);
                               ^
In file included from C:\Qt\Qt5.5.0\opencv\sources\modules\videoio\src\c  ap_dshow
.cpp:332:0:
C:/Qt/Qt5.5.0/Tools/mingw492_32/i686-w64-mingw32/include/strsafe.h: At global sc
ope:
C:/Qt/Qt5.5.0/Tools/mingw492_32/i686-w64-mingw32/include/strsafe.h:503:12: warni
ng: inline function 'HRESULT StringCbVPrintfA(STRSAFE_LPSTR, size_t, STRSAFE_LPC
STR, va_list)' used but never defined
 STRSAFEAPI StringCbVPrintfA(STRSAFE_LPSTR pszDest,size_t cbDest,STRSAFE_LPCSTR
pszFormat,va_list argList);
            ^
modules\videoio\CMakeFiles\opencv_videoio.dir\buil  d.make:177: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj' failed
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dsho
w.cpp.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
CMakeFiles\Makefile2:4321: recipe for target 'modules/videoio/CMakeFiles/opencv_
videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2


makefile:135: recipe for target 'all' failed
mingw32-make: *** [all] Error 2


C:\Qt\Qt5.5.0\opencv\Build>

----------


## ehsan_faal

دوست عزیز چرا از Ceemple استفاده نمیکنی.
توی خودش Qt و OpenCV رو هم داره.

----------


## gholami.vahid

> دوست عزیز چرا از Ceemple استفاده نمیکنی.
> توی خودش Qt و OpenCV رو هم داره.


سلام ممنون  واقعا ؟  یعنی کارم رو را میندازه   . بزارید ببینم

----------


## gholami.vahid

> دوست عزیز چرا از Ceemple استفاده نمیکنی.
> توی خودش Qt و OpenCV رو هم داره.


من الان دارم از opencv  رو ویژوال 2012 استفاده میکنم  و این ceemple  در مورد کیوت چیزی نداشت یا من ندیدم .

----------


## khavary

سلام
شما اول این فایل دانلود کنید
http://sourceforge.net/projects/open...0.exe/download
به عنوان مثال شما در درایو E نصب کردین
بعد کیوت را باز کنید و یک پروژه ایجاد کنید
واین دستورات را در فایل .pro اضافه کنید


INCLUDEPATH+=E:/opencv/opencv/build/include

LIBS+=-LE:/opencv/opencv/build/x86/vc11/lib     -lopencv_ts300     -lopencv_world300


بعد dll های پوشه E:\opencv\opencv\build\x86\vc11\bin  در کنار برنامه خودتون کپی کنید.

در ضمن این چیزی که گفتم برای کامپایلر Microsoft Visual Studio 2012 برای Qt هست.

----------


## gholami.vahid

> سلام
> شما اول این فایل دانلود کنید
> http://sourceforge.net/projects/open...0.exe/download
> به عنوان مثال شما در درایو E نصب کردین
> بعد کیوت را باز کنید و یک پروژه ایجاد کنید
> واین دستورات را در فایل .pro اضافه کنید
> 
> 
> INCLUDEPATH+=E:/opencv/opencv/build/include
> ...


سلام ببخشید یعنی نمیشه از این برای qt Crator استفاده کرد ؟

----------

