相关文章推荐

compile opencv3.4.1 with cmake3.11.3 using VS2015 on Win7 show error anyone help? #11688

@gewenpulan

Description

The CXX compiler identification is MSVC 19.0.24215.1
The C compiler identification is MSVC 19.0.24215.1
Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- broken
CMake Error at D:/Program Files/CMake/share/cmake-3.11/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

"D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: H:/opencv341/opencv-3.4.1/VS2015/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe" "cmTC_ae66c.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=14.0"
Microsoft (R) 生成引擎版本 14.0.25420.1
生成启动时间为 2018/6/5 15:47:35。
节点 1 上的项目“H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj”(默认目标)。
PrepareForBuild:
  正在创建目录“cmTC_ae66c.dir\Debug\”。
  正在创建目录“H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\Debug\”。
  正在创建目录“cmTC_ae66c.dir\Debug\cmTC_ae66c.tlog\”。
InitializeBuildStatus:
  正在创建“cmTC_ae66c.dir\Debug\cmTC_ae66c.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。
ClCompile:
  D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ae66c.dir\Debug\\" /Fd"cmTC_ae66c.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue  D:\Program Files\Python\Python35\Lib\site-packages\numpy\core\include "H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\testCCompiler.c"
  用于 x86 的 Microsoft (R) C/C++ 优化编译器 19.00.24215.1 版
  cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ae66c.dir\Debug\\" /Fd"cmTC_ae66c.dir\Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue  D:\Program Files\Python\Python35\Lib\site-packages\numpy\core\include "H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\testCCompiler.c"
  Program
c1 : fatal error C1083: 无法打开源文件: “D:\Program”: No such file or directory [H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj]
  include
c1 : fatal error C1083: 无法打开源文件: “Files\Python\Python35\Lib\site-packages\numpy\core\include”: No such file or directory [H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj]
  testCCompiler.c
  正在生成代码...
已完成生成项目“H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj”(默认目标)的操作 - 失败。
生成失败。
“H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj”(默认目标) (1) ->
(ClCompile 目标) -> 
  c1 : fatal error C1083: 无法打开源文件: “D:\Program”: No such file or directory [H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj]
  c1 : fatal error C1083: 无法打开源文件: “Files\Python\Python35\Lib\site-packages\numpy\core\include”: No such file or directory [H:\opencv341\opencv-3.4.1\VS2015\CMakeFiles\CMakeTmp\cmTC_ae66c.vcxproj]
    0 个警告
    2 个错误
已用时间 00:00:00.88

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

Configuring incomplete, errors occurred!
See also "H:/opencv341/opencv-3.4.1/VS2015/CMakeFiles/CMakeOutput.log".
See also "H:/opencv341/opencv-3.4.1/VS2015/CMakeFiles/CMakeError.log".

 
推荐文章