问题
I've downloaded the following Qt sources: http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.zip and tried to setup a distribution with static libraries using MS VC 2010.
Beforehand I did read the following articles:
http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows
http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler
I modified the mkspecs\win32-msvc2010\qmake.conf - update the QMAKE_CFLAGS_RELEASE key to use the MT option instead of MD. After that I executed the following command line from the VC 2010 command prompt:
configure -platform win32-msvc2010 -static -release
When that has finished I was asked to simply run nmake, which I did. After that I tried to add the qmake from the the static libs distribution folder to Qt Creator (Tools/Options - Qt section). It was unsuccessful - got "Failed to detect ABI(s) used by the Qt version" message by Qt Creator.
I also tried (on a clean distribution) modifying the qmake/Makefile.win32 file before running the configure command - added /MT option to the CFLAGS_BARE definition, but got the same error message in Qt Creator.
I'm using Qt Creator 2.3. - installed separately.
How can I solve this problem?
回答1:
Are you using the stable release of 2.3 or a release candidate / beta version of Qt Creator? Check Help->About Qt Creator for the version. If it is something like 2.x.xx try updating to a newer version of Qt Creator.
The issue you described was listed as a bug for 2.2.0 and was set to fixed for 2.3.0:
https://bugreports.qt.io/browse/QTCREATORBUG-4771
If you are already using a newer version and still have that issue, I've read something about putting a QtCore4.dll next to the .lib files. Qt Creator will then find the Qt version based on that dll, but will use the .libs for linking anyway.
回答2:
in my case.
qt 5.7.1 has /qt5.7.1/qtbase/qmake/project.o file
but qt 5.8.0 no exist project.o file
i'm newbie so waiting for patch.
:add
look for some infomation of ci called 'conan'
in github qt-webkit using conan build.
来源:https://stackoverflow.com/questions/8142047/how-to-build-static-qt-libraries-for-windows-and-use-them-with-qt-creator