Windows 7 + VS2010 SP1 compiled x64-bit version Qt4

Source: Internet
Author: User

Since QT officially did not release the precompiled 64-bit version of QT4, to use the 64-bit version of Qt4, can only compile themselves, the compilation process is as follows:

1, download the source code and extract to D:\qt-src\qt-everywhere-opensource-src-4.8.6, the path must not have spaces

2. Open the Visual Studio x64 Win64 Command Console and go to the appropriate directory.

D:

CD qt-src\qt-everywhere-opensource-src-4.8.6

3, setting environment variables

Set qtdir=d:\qt-src\qt-everywhere-opensource-src-4.8.6

Set qmakespec=win32-msvc2010

4, run configure, this command compiles the Qmake and generates the compilation script

Configue-platform Win32-msvc2010-opensource-fast-qt-style-windowsxp-qt-style-windowsvista-no-qt3support- Qt-sql-odbc-no-phonon-no-phonon-backend-no-script-no-scripttools-no-multimedia-nomake Examples-nomake Demos

5,4.8.x version of the source code, there is a character problem will cause the compilation can not pass, first open: <QT dir>\src\3rdparty\webkit\source\webcore\platform\ DefaultLocalizationStrategy.cpp file, find 327 lines in the original

Return web_ui_string ("Look Up" <selection> "", "Look up the context menu item with selected word"). Replace ("<selectio N> ", Truncatedstringforlookupmenuitem (selectedstring));

Change into

Return web_ui_string ("Look Up \" <selection>\ "", "Look up the context menu item with selected word"). Replace ("<select Ion> ", Truncatedstringforlookupmenuitem (selectedstring));

Is the quotation mark problem caused. If you do not change it, you will report an error like this:

Nmake:fatal error U1077: "CD": Return Code "0x2"
Stop.
Nmake:fatal error U1077: "CD": Return Code "0x2"
Stop.

6, run NMAKE, start compiling, normally it will be compiled in a few hours.

7, run cleanup, there are several cleaning options, according to their own circumstances to choose.

NMAKE clean cleans up intermediate files

NMAKE Confclean Cleanup Configuration

NMAKE Distclean all clean up, if you want to recompile, use this option

done!

Reference Links:

Http://blog.sina.com.cn/s/blog_671c54fe0100w0qz.html

http://blog.csdn.net/taigw/article/details/38130735

http://bbs.csdn.net/topics/380153284

Http://www.tuicool.com/articles/IvURFfa

Http://doc.qt.io/qt-4.8/install-win.html

Windows 7 + VS2010 SP1 compiled x64-bit version Qt4

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.