c++ - VSCode 和 Windows 10 的 cmake 错误:没有这样的文件或目录
问题描述
我在 Windows 10 中,在我的项目根文件夹中有hw.cpp
和CMakeLists.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 包含空格和字符“à”,这可能是问题吗?
问题似乎来自“à”。
解决方案
推荐阅读
- bash - 在 bash 脚本的 if 语句中使用函数和参数
- android - TabHost:切换选项卡后第一个加载的选项卡保持在后台
- java - Spring Websocket、RabbitMQ 和 STOMP 的性能问题
- python - 熊猫数据框
- angular - Angular - 从本地目录获取文件列表
- opencv - 如何使用opencv在图像中找到近似三角形
- c# - 将多种序列化格式存储在一个文件中?AKA 避免集合的序列化膨胀
- vba - VBA - 页脚修改 - 取消链接到上一个
- python-3.x - 在 Python 中动态加载模块
- python - Python:将小于(<)运算符与“and”关键字结合使用?