Windows 10 中的 Caffe Build 错误



我正在尝试按照此处的说明在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 CMakeFilescmTC_6595e.dirtestCCompiler.c.obj
FAILED: CMakeFiles/cmTC_6595e.dir/testCCompiler.c.obj
C:MinGWbingcc.exe -o CMakeFilescmTC_6595e.dirtestCCompiler.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

咖啡构建错误

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

提前感谢!

我终于想通了。这是我计算机中的C编译器的问题 - gcc。我重新安装了编译器,并根据此解决方案将以下两行添加到CMakeList.txt文件,

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

最新更新