0

我达到大约 80%,然后突然停止并显示以下消息。我正在使用 MingGW 和 MSYS make 和 Cmake 进行配置。

[ 80%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_
warp_perspective.cpp.obj
[ 80%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/utili
ty.cpp.obj
Linking CXX executable ../../bin/opencv_test_gpu.exe
Info: resolving vtable for cv::_OutputArray by linking to __imp___ZTVN2cv12_Outp
utArrayE (auto-import)
Info: resolving vtable for cv::_InputArray by linking to __imp___ZTVN2cv11_Input
ArrayE (auto-import)
Info: resolving vtable for cv::BFMatcher by linking to __imp___ZTVN2cv9BFMatcher
E (auto-import)
Info: resolving vtable for cv::SURF by linking to __imp___ZTVN2cv4SURFE (auto-im
port)
Info: resolving VTT for cv::SURF by linking to __imp___ZTTN2cv4SURFE (auto-impor
t)
Info: resolving vtable for cv::ORB by linking to __imp___ZTVN2cv3ORBE (auto-impo
rt)
Info: resolving VTT for cv::ORB by linking to __imp___ZTTN2cv3ORBE (auto-import)

Info: resolving vtable for cv::Exception by linking to __imp___ZTVN2cv9Exception
E (auto-import)
Creating library file: ../../bin/libopencv_test_gpu.dll.a
c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: warn
ing: auto-importing has been activated without --enable-auto-import specified on
 the command line.
This should work unless it involves constant data structures referencing symbols
 from auto-imported DLLs.
Cannot export _ZN12_GLOBAL__N_110ReduceCodeC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_113ORB_ScoreTypeC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_114TemplateMethodC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_121FarnebackOptFlowFlagsC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_17CmpCodeC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_17MorphOpC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_18DftFlagsC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_18DistTypeC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_18FlipCodeC1Ei: symbol not found
Cannot export _ZN12_GLOBAL__N_19GemmFlagsC1Ei: symbol not found
Cannot export _ZNK12_GLOBAL__N_110ReduceCode7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_110ReduceCodecviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_113ORB_ScoreType7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_113ORB_ScoreTypecviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_114TemplateMethod7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_114TemplateMethodcviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_121FarnebackOptFlowFlags7PrintToEPSo: symbol not
found
Cannot export _ZNK12_GLOBAL__N_121FarnebackOptFlowFlagscviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_17CmpCode7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_17CmpCodecviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_17MorphOp7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_17MorphOpcviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_18DftFlags7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_18DftFlagscviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_18DistType7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_18DistTypecviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_18FlipCode7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_18FlipCodecviEv: symbol not found
Cannot export _ZNK12_GLOBAL__N_19GemmFlags7PrintToEPSo: symbol not found
Cannot export _ZNK12_GLOBAL__N_19GemmFlagscviEv: symbol not found
collect2: ld returned 1 exit status
make[2]: *** [bin/opencv_test_gpu.exe] Error 1
make[1]: *** [modules/gpu/CMakeFiles/opencv_test_gpu.dir/all] Error 2
make: *** [all] Error 2
4

1 回答 1

1

看起来 GPU 代码遇到了问题。您可以尝试几件事:

  • 确保 CUDA 安装正确并且 CMake 可以找到它。
  • 禁止构建 GPU 库。
  • 如果您使用的是 SVN 主干,我有时会遇到构建中断的 GPU 部分。您可能需要使用较早的版本或提交错误报告。

此外,如果您还没有查看 OpenCV 的构建指南;看看这里这里

于 2012-06-26T15:43:23.133 回答