gpt4 book ai didi

ubuntu - 如何将 WSL 与 CLion 一起使用

转载 作者:行者123 更新时间:2023-12-04 14:14:25 37 4
gpt4 key购买 nike

我正在尝试设置 CLion 以使用适用于 Linux 的 Windows 子系统,按照 https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-clion.html# 中的说明进行操作. Windows 版本 10.0.18362.836。 Ubuntu 20.04 LTS,所有软件都是最新的。

我在“设置”对话框的“构建、执行、部署”>“工具链”页面上收到以下错误报告:测试 CMake 运行已完成,错误更多...详情...

CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The C compiler identification is GNU 9.3.0
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The CXX compiler identification is GNU 9.3.0
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:80 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:73 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- Configuring incomplete, errors occurred!
See also "/mnt/c/Users/user/AppData/Local/Tmp/cmake_check_environment/_build2367382020510955708/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Users/user/AppData/Local/Tmp/cmake_check_environment/_build2367382020510955708/CMakeFiles/CMakeError.log".

Error code: 1

我该怎么做才能解决这个问题?

最佳答案

我在使用 WSL 2 和 Ubuntu 20.04.1 时遇到了同样的问题。

问题似乎是 Ubuntu WSL 和 Windows 主机的处理器时钟略有不同步。

CMakeError.log:

make: Warning: File 'CMakeFiles/cmTC_823ef.dir/flags.make' has modification time 0.046 s in the future
make: warning: Clock skew detected. Your build may be incomplete.

使用 wsl --shutdownwsl 重新启动 WSL 解决了这个问题。

可以找到问题的解决方案here .

关于ubuntu - 如何将 WSL 与 CLion 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61859664/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com