Windows10-Linux18.04子系統:界面可視化及CMake配置筆記

參考資料

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003413779-Troubles-with-WSL-toolchain-Test-CMake-run-finished-with-errors-
https://blog.csdn.net/langliu/article/details/80277309
https://blog.csdn.net/weixin_38169562/article/details/99804798


方法

1 安裝可視界面:建議完全按照第二個參考鏈接的方法,此處只是備份一下。

安裝必要依賴庫

sudo apt-get install xfce4 vnc4server xrdp -y

第一次啓動vncserver(xstartup第一次配置後纔會生成)

vncserver  :1
vncserver  -kill :1

配置xstartup文件

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
xfce4-session &
————————————————
版權聲明:本文爲CSDN博主「langliu」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/langliu/article/details/80277309

重啓

sudo vncserver -kill :1    #殺死關閉vncserver
vncserver          #vncserver再次重啓
sudo service xrdp restart     #重新啓動xrdp

修正Windows Linux子系統的編譯錯誤

問題在使用CMake編譯項目時遇到,如下:

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


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


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

....

新建wsl.conf文件

sudo vim /etc/wsl.conf

文件內容爲:

# /etc/wsl.conf
[automount]
options = "metadata"
enabled = true

重啓子系統

Using CMD (Administrator)

net stop LxssManager
net start LxssManager
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章