我知道有几个问题,但没有人告诉我我能对付错误做些什么。
使用this guide我已经能够使用本指南和cmake编译当前的OpenCV版本(2.2)。所以发布工作正常,我可以在Qt中使用它编写代码。因此我需要启用WITH_QT并需要自己构建。
但不幸的是我发现2.2版本不支持所有类型的摄像头(因为我想从720p网络摄像头获取摄像头流)。我已经读到这是在最新的svn trunk版本中修复的。
所以我检查了最新的svn trunk并再次运行Cmake,创建了一个新的文件夹,选择了源文件,MinGW编译链接到g ++。exe和qcc.exe,配置并启用了“WITH_QT”并生成了必要的命令描述文件。
然后我启动了一个Windows Powershell作为Admin并试图用“mingw32-make”进行编译......但是56%它突然崩溃了:
[ 56%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_sunras.obj
[ 56%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_tiff.obj
Linking CXX shared library ..\..\bin\libopencv_highgui220d.dll
Creating library file: ..\..\lib\libopencv_highgui220d.dll.a
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
ee): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
104): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2a6): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2d4): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2fe): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
314): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
4b6): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
4e4): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1b41): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1b5a): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1bb4): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1c03): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1c88): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
1ca7): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2265): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
228d): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2318): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
2337): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
28f5): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
291d): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
38a0): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
38df): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
406b): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
40a3): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
4211): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
42ec): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
6cf8): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
6d17): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
6e1e): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
6e3e): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
7002): undefined reference to `_Unwind_SjLj_Resume'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
70b4): undefined reference to `__gxx_personality_sj0'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
70cd): undefined reference to `_Unwind_SjLj_Register'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
7111): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
742e): undefined reference to `_Unwind_SjLj_Unregister'
C:\workspace\opencv\OpenCV_SVN\modules\highgui\..\..\3rdparty\lib/libvideoInput.a(videoInput.o):videoInput.cpp:(.text+0x
7501): undefined reference to `_Unwind_SjLj_Resume'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [bin/libopencv_highgui220d.dll] Error 1
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
mingw32-make: *** [all] Error 2
编译libVideoInput时似乎出现了问题...... 有人熟悉这个错误吗?我该如何解决?我之前需要安装什么特别的东西吗?
如果有人能帮助我会很棒!谢谢!
答案 0 :(得分:1)
理论上,通过使用QT安装OpenCV,您不需要highgui库。所以在安装OpenCV时,你应该从Cmake gui中取消选择highgui。 Youtube / Web上有一些教程展示了如何在没有highgui lib的情况下使用OpenCV和QT。祝你好运