MS VC 2022开发Linux应用记录之02篇-开发调试Linux QT应用

MS VC 2022开发Linux应用记录之02篇

1. 安装QT5

apt-get update

apt-get install build-essential

apt-get install qtcreator

apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools

apt-get install qtcreator

apt-get install qt5*

apt-get install libfontconfig1

apt-get install mesa-common-dev

apt-get upgrade

2. 配置显示

首先 vim ~/.bashrc 然后在里面添加 export QT_QPA_PLATFORM=wayland

即时生效 source ~/.bashrc

vim /etc/profile , 添加 export DISPLAY=:0.0 ,wq,保存退出 ,再 source /etc/profile 生效。

3. 下载项目

GitHub - micosta/qt_vs_linux__wiggly: Qt Wiggly Example converted to MSVC targeting both Windows and LinuxQt Wiggly Example converted to MSVC targeting both Windows and Linux - GitHub - micosta/qt_vs_linux__wiggly: Qt Wiggly Example converted to MSVC targeting both Windows and Linuxhttps://github.com/micosta/qt_vs_linux__wiggly

4. 在VC中打开,编译连接。

5. 调试运行,发现可以调试

MS VC 2022开发Linux应用记录之02篇-开发调试Linux QT应用_第1张图片

MS VC 2022开发Linux应用记录之02篇-开发调试Linux QT应用_第2张图片

6. 在虚拟机内部可以启动该程序运行

你可能感兴趣的:(linux,c++,visualstudio)