静态编译Qt,为发布软件做准备

执行

cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>

遇到如下错误

Running configuration tests (phase 2)...
The test for linking against libxcb and support libraries failed!
 You might need to install dependency packages, or pass -qt-xcb.

搜索到解决办法,网址 https://wiki.qt.io/Building_Qt_5_from_Git

Ubuntu/Debian系统安装libxcb的命令是:sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev

你可能感兴趣的:(静态编译Qt,为发布软件做准备)