Building Qt 4.5 with Visual C++ 2010
Did somebody tried to build Qt 4.5 with Visual Studio 2010 (Beta 2)? Any hints on doing that successfuly?
Later edit I tried to run configure fro开发者_开发百科m a Visual Studio 2010 console. There is no makespecs support for 2010, so configure fails because of that.
It worked for me to build just as if it was vs2008, but using the vs2010 tools:
- Open vs2010 command prompt. cd into the top-level Qt directory.
- configure.exe -platform win32-msvc2008 -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast
- nmake
For Qt 4.6.2 (or perhaps other 4.6 versions as well)...
To save you some time, here are the errors which need fixing in order to build webkit (this is to expand upon Ben's answer).
The errors appear in the following files (the two files are identical, and the errors need to be fixed in each):
- %QTDIR%\qt\src\3rdparty\webkit\javascriptcore\runtime\StructureTransitionTable.h
- %QTDIR%\qt\src\3rdparty\javascriptcore\JavaScriptCore\runtime\StructureTransitionTable.h
Here are the errors and how to fix them:
- %QTDIR%\qt\src\3rdparty\webkit\javascriptcore\runtime\StructureTransitionTable.h(146)
:
table()->add(key, Transition(structure, 0));
Change it totable()->add(key, Transition(structure, nullptr));
- %QTDIR%\qt\src\3rdparty\webkit\javascriptcore\runtime\StructureTransitionTable.h(153)
:
table()->add(key, Transition(0, structure));
Change it totable()->add(key, Transition(nullptr, structure));
- Make the same two changes for %QTDIR%\qt\src\3rdparty\javascriptcore\JavaScriptCore\runtime\StructureTransitionTable.h (or copy your edited file over this one)
The qt-vs-addin-1.1.6
recognizes VS 2010 now as a suitable platform,
but it's not documented yet by qt.
Also note that -platform win32-msvc2010 now works as well instead of having to use win32-msvc2008.
With Qt 4.7 and Visual Studio Add-in 1.1.7, it integrates with VS2010.
See this.
For the moment... I will continue using the builds made with VS 2008 with VS 2010. While I am using it for development purpose only, with no intentions for releasing something (so no manifest nightmare yet), it is acceptable. Hopefully, Qt will soon officially support VS2010.
You can find a tutorial how to compile Qt 4.7 Beta 1 using Visual Studio 2010 and Windows 7 here:
TUTORIAL
精彩评论