【问题标题】:Caffe Build Error in Windows 10Windows 10 中的 Caffe 构建错误
【发布时间】:2017-07-27 14:12:59
【问题描述】:

我正在尝试按照here 的说明在 Windows 10 中构建 Caffe。我已经安装了所有的先决条件和依赖项。但我收到以下错误。

-- The C compiler identification is unknown
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-
3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
 The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
 program.

 It fails with the following output:

  Change Dir: C:/Caffe/caffe/build/CMakeFiles/CMakeTmp

 Run Build Command:"C:/Ninja/ninja.exe" "cmTC_6595e"

 [1/2] Building C object CMakeFiles\cmTC_6595e.dir\testCCompiler.c.obj

 FAILED: CMakeFiles/cmTC_6595e.dir/testCCompiler.c.obj

 C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_6595e.dir\testCCompiler.c.obj -c
 testCCompiler.c

 ninja: build stopped: subcommand failed.

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


-- Configuring incomplete, errors occurred!
See also "C:/Caffe/caffe/build/CMakeFiles/CMakeOutput.log".
See also "C:/Caffe/caffe/build/CMakeFiles/CMakeError.log".
ERROR: Configure failed

Caffe Build Error

我寻找解决方案并尝试了不同的方法,但没有任何方法可以解决问题。非常感谢这方面的任何帮助。

提前致谢!

【问题讨论】:

    标签: gcc cmake windows-10 caffe


    【解决方案1】:

    我终于明白了。这是我计算机中的 C 编译器的问题 - gcc。我根据this solution重新安装了编译器并在CMakeList.txt文件中添加了两行,

    set(CMAKE_C_COMPILER "C:/MinGW/bin/gcc.exe")
    set(CMAKE_CXX_COMPILER "C:/MinGW/bin/g++.exe")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-18
      • 1970-01-01
      • 2015-11-14
      • 2016-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多