Clion远程模式可以upload to remote host却没法build cmake的bug解决方法

问题

系统环境

Clion版本 2019.3.2
remote host: Ubuntu 19.10app

问题描述

在使用Clion的远程模式(Full Remote Mode)开发调试代码下,Upload to Remote Host成功,但build Cmake的时候失败:ui

报错提示:spa

Cannot create directory

[Failed to reload]

build_cmake_failed.png

缘由

在Jetbrains的Issue Error: Cannot generate into E:workcmake-build-remote-debug. Cannot create directory. Please either delete it manually or select another generation directory. 中Jetbrains的开发者提到这是因为Deployment里的Root Path没有生效。debug

absolute_path.png

解决方法

Settings -> Deployment -> 你的Remote Host -> Connection标签 -> Root path: /调试

correct_connection_tag.png

Settings -> Deployment -> 你的Remote Host -> Mappings标签 -> Deployment path: 登录远程主机当前用户目录下你想放源码的地方code

correct_mappings_tag.png

Build and Run :blog

build_remote.png

run_hello.png

相关文章
相关标签/搜索