无法为静态构建配置Qt

时间:2012-03-23 08:16:26

标签: qt static-linking qmake

基本上这是this question的转贴,但从未得到回应。我试图按照这些说明为静态链接设置Qt。 到目前为止,我所做的就是去我的Qt版本,然后运行

configure -static

我得到一些输出,结尾于:

Sources are in..............C:\QtSDK\Desktop\Qt\4.8.0\msvc2010
Build is done in............C:\QtSDK\Desktop\Qt\4.8.0\msvc2010
Install prefix..............C:\QtSDK\Desktop\Qt\4.8.0\msvc2010
Headers installed to........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/include
Libraries installed to......C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/lib
Plugins installed to........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/plugins
Imports installed to........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/imports
Binaries installed to.......C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/bin
Docs installed to...........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/doc
Data installed to...........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010
Translations installed to...C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/translations
Examples installed to.......C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/examples
Demos installed to..........C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/demos

WARNING: Using static linking will disable the use of plugins.
     Make sure you compile ALL needed modules into the library.
Running syncqt...
I couldn't find a pro file for QtCore module
syncqt failed, return code 9

请帮忙

2 个答案:

答案 0 :(得分:4)

从源代码编译Qt 4.8.0已知问题。 只需删除qt bin文件夹中的syncqt。*:

http://labs.qt.nokia.com/2011/12/15/qt-4-8-0-released/#comment-49942 http://labs.qt.nokia.com/2011/12/15/qt-4-8-0-released/#comment-49951 http://labs.qt.nokia.com/2011/12/15/qt-4-8-0-released/#comment-49953

答案 1 :(得分:0)

我遇到了user963258的相同情况,我得到了同样的错误。 我从qt bin文件夹中删除了syncqt。*但是我得到了同样的错误

qmake gives code 3 when attempting to configure qt for static building

为什么Qt4.8有这么多问题?