我正在尝试构建一个示例C ++项目以熟悉Windows上的CMake(我遵循this tutorial),并且设法使用以下命令为MinGW生成Makefile:
$ cmake .. -G "MinGW Makefiles"
但是当我尝试使用 mingw32-make 制作该文件时,它失败并显示以下错误:
# the following line means "Path not found." in French
Le chemin d’accès spécifié est introuvable.
Makefile:249: recipe for target 'cmake_check_build_system' failed
mingw32-make: *** [cmake_check_build_system] Error 1
当我使用-d
标志运行 mingw32-make 时,这是输出:
$ mingw32-make -d
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
find_and_set_shell() path search set default_shell = C:/Program Files/Git/usr/bin/sh.exe
Reading makefiles...
Reading makefile 'Makefile'...
find_and_set_shell() setting default_shell = cmd.exe
Updating makefiles....
Considering target file 'Makefile'.
Looking for an implicit rule for 'Makefile'.
Trying pattern rule with stem 'Makefile'.
Trying implicit prerequisite 'Makefile,v'.
Trying pattern rule with stem 'Makefile'.
Trying implicit prerequisite 'RCS/Makefile,v'.
Trying pattern rule with stem 'Makefile'.
Trying implicit prerequisite 'RCS/Makefile'.
Trying pattern rule with stem 'Makefile'.
Trying implicit prerequisite 's.Makefile'.
Trying pattern rule with stem 'Makefile'.
Trying implicit prerequisite 'SCCS/s.Makefile'.
No implicit rule found for 'Makefile'.
Finished prerequisites of target file 'Makefile'.
No need to remake target 'Makefile'.
Updating goal targets....
Considering target file 'default_target'.
File 'default_target' does not exist.
Considering target file 'all'.
File 'all' does not exist.
Considering target file 'cmake_check_build_system'.
File 'cmake_check_build_system' does not exist.
Finished prerequisites of target file 'cmake_check_build_system'.
Must remake target 'cmake_check_build_system'.
Creating temporary batch file C:\Users\Ewaren\AppData\Local\Temp\make9944-1.bat
Batch file contents:
@echo off
"C:\Program Files\CMake\bin\cmake.exe" -SC:\Users\Ewaren\Programmation\Tutos\sample_cmake -BC:\Users\Ewaren\Programmation\Tutos\sample_cmake\build --check-build-system CMakeFiles\Makefile.cmake 0
CreateProcess(C:\Users\Ewaren\AppData\Local\Temp\make9944-1.bat,C:\Users\Ewaren\AppData\Local\Temp\make9944-1.bat,...)
Putting child 02ac3a08 (cmake_check_build_system) PID 44864936 on the chain.
Live child 02ac3a08 (cmake_check_build_system) PID 44864936
Main thread handle = 00000138
Le chemin d’accès spécifié est introuvable.
Reaping losing child 02ac3a08 PID 44864936
Cleaning up temp batch file C:\Users\Ewaren\AppData\Local\Temp\make9944-1.bat
Makefile:249: recipe for target 'cmake_check_build_system' failed
mingw32-make: *** [cmake_check_build_system] Error 1
Removing child 02ac3a08 PID 44864936 from chain.
我不理解错误消息中提到的什么路径,有人可以帮我吗?谢谢。