Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gcc CMake错误:配置文件问题配置文件-使用CLion_Gcc_Cmake_G++_Clion - Fatal编程技术网

Gcc CMake错误:配置文件问题配置文件-使用CLion

Gcc CMake错误:配置文件问题配置文件-使用CLion,gcc,cmake,g++,clion,Gcc,Cmake,G++,Clion,我正在尝试使用WSL在Windows上设置CLion,遵循官方教程: 当设置工具链时,现在在编辑器中,在识别C编译器和特性、C++编译器和特性之后,我得到相同的错误。导致错误的行始终相同: configure_file( ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in ${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake @ONLY ) 我正在将Linux 2的Windows子系统与Ub

我正在尝试使用WSL在Windows上设置CLion,遵循官方教程:

当设置工具链时,现在在编辑器中,在识别C编译器和特性、C++编译器和特性之后,我得到相同的错误。导致错误的行始终相同:

configure_file(
  ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in
  ${CMAKE_PLATFORM_INFO_DIR}/CMakeCXXCompiler.cmake
  @ONLY
)

我正在将Linux 2的Windows子系统与Ubuntu 20.04、GCC和G++9.3.0版一起使用


请帮我诊断这个问题。

我也有同样的问题

我在这里找到了解决方案:

总之,您应该创建一个wsl配置文件
/etc/wsl.conf
,并添加以下行:

[automount]
options = "metadata"
enabled = true
在此之后,您应该重新启动wsl(在powershell中)


如果可能,请以文本形式提供错误消息。如果错误已经以文本形式呈现,您可以使用图像来补充您的帖子。
wsl.exe -l     // gets a list of your linux distributions
wsl.exe -t *name-of-your-distribution*