C++ 配置:在linux中静态链接Qt 5.4项目时未找到文件

C++ 配置:在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/ 这可能是新

我有一个应用程序,我想使用静态链接进行部署。我正在使用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/

这可能是新手,但我现在应该如何部署我的应用程序?

我可以描述我为Windows所做的步骤

  • 配置Qt静态构建。对于此下载源代码,请在
    d:\Qt\5.4\Src\qtbase\mkspecs\win32-g++\qmake.conf
    中将行
    qmake\u LFLAGS=
    更改为
    qmake\u LFLAGS=-static-static libgcc
    。然后保存并退出
  • 做Qt。在控制台中(最好从Qt文件夹中选择一个,如桌面的
    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)
    
  • 在Qt选项中添加套件(构建和运行选项卡)
  • 为项目选择了新工具包。应该可以使用
  • 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)