首页 > 解决方案 > VSCode 和 Windows 10 的 cmake 错误:没有这样的文件或目录

问题描述

我在 Windows 10 中,在我的项目根文件夹中有hw.cppCMakeLists.txt.

后一个文件包含:

cmake_minimum_required(VERSION 3.5)

project (hello_cmake)

add_executable(hello_cmake hw.cpp)

我想使用 cmake 来生成 makefile。

我使用cmake -G "MinGW Makefiles"没有问题。

我必须采取的下一步措施是什么?

当我跑步时,mingw32-make.exe我得到:

CMake Error: Target DependInfo.cmake file not found
Building CXX object CMakeFiles/hello_cmake.dir/hw.cpp.obj
cc1plus.exe: fatal error: C:\path\to\root\hw.cpp: No such file or directory

出了什么问题,我该如何解决?谢谢!


我的 path/to/root 包含空格和字符“à”,这可能是问题吗?


问题似乎来自“à”。

标签: c++cmake

解决方案


推荐阅读