cmake 编译 QT程序 linux
编译条件
Linux 以ubuntu 16.04为例
1. 安装QT SDK Qt 5.14.2
qt-opensource-linux-x64-5.14.2.run
命令行到文件的目录下面运行 ./qt-opensource-linux-x64-5.14.2.run 进入向导安装
帐号密码自行去注册
组件根据需要自行选择

2. 安装cmake
执行程序安装
3.编译程序
设置QT SDK路径
set(tmp1_path "/opt/Qt5.14.2/5.14.2/gcc_64/")
set(tmp2_path "/opt/QT/5.14.2/gcc_64/")
这两个路径中如果包含了就不设置,否则修改其中一个。脚本中会通过if判断语句进行配置。

编译
1. mkdir build ; cd build
2. cmake -DCMAKE_TOOLCHAIN_FILE=../plat/linux_x86.cmake ..
3. make -j
相关推荐
-
nginx检查提示“unknown directive "stream" in /etc/*/nginx.conf”
nginx检查提示“unknown directive "stream" in /etc/*/nginx.conf”2025-02-26 00:38:21 -
php之多级目录下查找文件中是否含有某个字符串功能实现2025-02-26 00:36:35
-
mysql 启动不了1067错误如何解决?2025-02-26 00:33:31
-
MySQL简单INSERT超慢原因排查2025-02-26 00:22:42
-
mysql分布式数据库的主要构架是什么?2025-02-26 00:06:23