C++ 配置:在linux中静态链接Qt 5.4项目时未找到文件
我有一个应用程序,我想使用静态链接进行部署。我正在使用Qt5.4和ubuntu。我了解到,要部署我的应用程序,我必须使用以下代码静态创建QtC++ 配置:在linux中静态链接Qt 5.4项目时未找到文件,c++,linux,qt5.4,C++,Linux,Qt5.4,我有一个应用程序,我想使用静态链接进行部署。我正在使用Qt5.4和ubuntu。我了解到,要部署我的应用程序,我必须使用以下代码静态创建Qt cd /path/to/Qt ./configure -static -prefix /path/to/Qt <other parameters> make sub-src 当我检查Qt目录时,确实没有配置文件。我只能找到 configure.prf in Qt5.4.0/5.4/gcc_64/mkspecs/features/ 这可能是新
cd /path/to/Qt
./configure -static -prefix /path/to/Qt <other parameters>
make sub-src
当我检查Qt目录时,确实没有配置文件。我只能找到
configure.prf
in Qt5.4.0/5.4/gcc_64/mkspecs/features/
这可能是新手,但我现在应该如何部署我的应用程序?我可以描述我为Windows所做的步骤
d:\Qt\5.4\Src\qtbase\mkspecs\win32-g++\qmake.conf
中将行qmake\u LFLAGS=
更改为qmake\u LFLAGS=-static-static libgcc
。然后保存并退出Qt 5.4(MinGW 4.9 32位)
转到d:\Qt\5.4\Src\qtbase
,更改环境变量
集合库=
集合包括=
设置QTDIR=D:\Qt\5.4\Src\qtbase
设置QMAKESPEC=win32-g++
设置PATH=C:\Python34;C:\草莓\perl\bin;d:\Qt\Tools\mingw491\u 32\bin;d:\Qt\5.4\Src\qtbase\bin;%PATH%configure.exe -debug-and-release -opensource -c++11 -static -opengl desktop -no-angle -no-vcproj -nomake examples -nomake demos
mingw32-make.exe (This can take time)
configure.exe -debug-and-release -opensource -c++11 -static -opengl desktop -no-angle -no-vcproj -nomake examples -nomake demos
mingw32-make.exe (This can take time)