sinat_36704332
sinat_36704332
采纳率0%
2017-07-27 03:03 阅读 2.0k

opencv配置在qt5.6上的问题

通过cmake 3.7.2 Configure OpenCV3.2的source文件遇到以下问题:
Make Error at D:/pack/opencv/cmake-3.7.2-64位/cmake-3.7.2-win64-x64/share/cmake-3.7/Modules/CMakeTestCXXCompiler.cmake:44 (message):
The C++ compiler "D:/qtcreator/Tools/mingw492_32/bin/g++.exe" is not able
to compile a simple test program.

It fails with the following output:

Change Dir: D:/pack/opencv/release/CMakeFiles/CMakeTmp

Run Build Command:"D:/qtcreator/Tools/mingw492_32/bin/mingw32-make.exe"
"cmTC_97ee7/fast"

D:/qtcreator/Tools/mingw492_32/bin/mingw32-make.exe -f
CMakeFiles\cmTC_97ee7.dir\build.make CMakeFiles/cmTC_97ee7.dir/build

mingw32-make.exe[1]: Entering directory
'D:/pack/opencv/release/CMakeFiles/CMakeTmp'

CMakeFiles\cmTC_97ee7.dir\build.make:64: recipe for target
'CMakeFiles/cmTC_97ee7.dir/testCXXCompiler.cxx.obj' failed

process_begin: CreateProcess(NULL,
D:\pack\opencv\cmake-3.7.2-64位\cmake-3.7.2-win64-x64\bin\cmake.exe -E
cmake_echo_color --switch=
--progress-dir=D:\pack\opencv\release\CMakeFiles\CMakeTmp\CMakeFiles
--progress-num=1 "Building CXX object
CMakeFiles/cmTC_97ee7.dir/testCXXCompiler.cxx.obj", ...) failed.

make (e=2): 系统找不到指定的文件。

mingw32-make.exe[1]: ***
[CMakeFiles/cmTC_97ee7.dir/testCXXCompiler.cxx.obj] Error 2

mingw32-make.exe[1]: Leaving directory
'D:/pack/opencv/release/CMakeFiles/CMakeTmp'

makefile:125: recipe for target 'cmTC_97ee7/fast' failed

mingw32-make.exe: *** [cmTC_97ee7/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:98 (project)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • sinat_36704332 sinat_36704332 2017-07-27 08:25

    目前的解决方案是,换一个cmake要高版本的起码要3.8.0,另外环境变量要配置好

    点赞 评论 复制链接分享

相关推荐