在Windows下为静态链接编译Qt 5.3.0

时间:2014-06-13 14:55:28

标签: qt static compilation

我正在尝试按照本教程编译Qt以进行静态链接:http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW

但是我收到了大量的警告和一些错误。

例如这一个:

C:/Developement/Qt/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lqjp2
collect2.exe: error: ld returned 1 exit status
Makefile.Release:79: recipe for target '..\..\bin\dumpdoc.exe' failed
mingw32-make[4]: *** [..\..\bin\dumpdoc.exe] Error 1
mingw32-make[4]: Target 'first' not remade because of errors.
mingw32-make[4]: Leaving directory 'C:/Developement/Qt/Static/src/qt-everywhere-opensource-src-5.3.0/qtactiveqt/tools/dumpdoc'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Target 'first' not remade because of errors.

为此,我将environement变量设置为我的路径:

Name: LIBRARY_PATH
Value: C:\Developement\Qt\5.3\mingw482_32\bin

...但是,如果它能够工作的话,那就不知道了。

除此之外,我将以下路径放到PATH环境变量中:

C:\Developement\Qt\5.3\mingw482_32\bin;
C:\Developement\Qt\Tools\mingw482_32\bin;

我收到了大量这样的警告:

  

包含来自的文件   C:\发展论坛\ Qt的\静态\ SRC \ QT-无处不开源-SRC-5.3.0 \ qtbase \ SRC \的3rdParty \的libjpeg / jpeglib.h:25:0,                    从...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_jpeglib.h:74,                    从...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:75:   C:\发展论坛\ Qt的\静态\ SRC \ QT-无处不开源-SRC-5.3.0 \ qtbase \ SRC \的3rdParty \的libjpeg / jconfig.h:55:0:   警告:" HAVE_STDDEF_H"重新定义[默认启用] #define   HAVE_STDDEF_H ^包含在的文件中   ...... \的3rdParty \碧玉\ SRC \ libjasper \包括/碧玉/ jas_tvp.h:75:0,                    来自...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:70:   ...... \的3rdParty \碧玉\ SRC \ libjasper \包括/碧玉/ jas_config.h:65:0:   注意:这是前一个定义#define的位置   HAVE_STDDEF_H 1 ^包含的文件   C:\发展论坛\ Qt的\静态\ SRC \ QT-无处不开源-SRC-5.3.0 \ qtbase \ SRC \的3rdParty \的libjpeg / jpeglib.h:25:0,                    从...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_jpeglib.h:74,                    从...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:75:   C:\发展论坛\ Qt的\静态\ SRC \ QT-无处不开源-SRC-5.3.0 \ qtbase \ SRC \的3rdParty \的libjpeg / jconfig.h:59:0:   警告:" HAVE_STDLIB_H"重新定义[默认启用] #define   HAVE_STDLIB_H ^       在...... \ 3rdparty \ jasper \ src \ libjasper \ include / jasper / jas_tvp.h:75:0中包含的文件中,                    来自...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:70:       ...... \的3rdParty \碧玉\ SRC \ libjasper \包括/碧玉/ jas_config.h:71:0:   注意:这是前一个定义的位置       #define HAVE_STDLIB_H 1       ^       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:在函数' jpg_decode':       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:134:49:警告:参数' optstr'设置但未使用       [-Wunused-但设定参数]       jas_image_t * jpg_decode(jas_stream_t * in,char * optstr)                                                    ^       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:在函数' jpg_start_output':       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:298:47:警告:参数' cinfo'设置但未使用   [-Wunused-但设定参数]       static void jpg_start_output(j_decompress_ptr cinfo,jpg_dest_t * dinfo)                                                  ^       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:在函数' jpg_finish_output':       ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:335:48:警告:参数' cinfo'设置但未使用   [-Wunused-但设定参数]       static void jpg_finish_output(j_decompress_ptr cinfo,jpg_dest_t * dinfo)                                                   ^ ...... \ 3rdparty \ jasper \ src \ libjasper \ jpg \ jpg_dec.c:335:67:警告:   参数' dinfo'设置但未使用[-Wunused-but-set-parameter]       static void jpg_finish_output(j_decompress_ptr cinfo,jpg_dest_t * dinfo)                                                                      ^

我没准备好编译Qt吗?

为了能够编译Qt而不是每次都抛出错误我需要做什么?

在编译之前需要多长时间。

0 个答案:

没有答案