Windows10下CMake编译VTK 9.2.2失败:无法写入文件/创建目录求助
VTK 9.2.2 CMake构建失败问题
错误信息
CMake Error: Cannot open file for write: C:/Program Files/vtk/bin/CMakeCache.txt.tmpc3fcf
CMake Error: Unable to (re)create the private pkgRedirects directory:
C:/Program Files/vtk/bin/CMakeFiles/pkgRedirects
CMake Error: : System Error: No such file or directory
CMake Error: Unable to open cache file for save. C:/Program Files/vtk/bin/CMakeCache.txt
CMake Error: : System Error: No such file or directory
环境信息
- Windows 10 系统
- VTK 9.2.2
- CMake 3.25.1
- 尝试过多个Visual Studio版本,问题一致
执行步骤
- 从官网下载VTK
- 将下载文件放入Program Files目录
- 在下载包外创建/vtk文件夹,并在其中新建/src和/bin子文件夹
- 将下载文件复制到/src文件夹
- 打开CMake GUI,选择/src为源目录,/bin为构建目录
- 点击Generate后出现上述错误
已尝试动作
- 按照视频教程操作,问题未解决
- 搜索相关解决方案,未找到完全匹配的错误案例
内容的提问来源于stack exchange,提问作者Compiler v2
相关产品推荐
相关产品推荐

