qt4.8.7 source code in the WIN7+VS2010 Environment x64 compilation (QT 64-bit)

Source: Internet
Author: User

As the QT official online, not directly provide x64 installation package, but because the project needs x64 Qt, so, small series have to download QT source code, experienced a time up to about 4 hours of compilation process. This year's National day 7 days, on this matter, haha ~ ~ ~

Several download links:

QT source and its binary installation package download: https://download.qt.io/#userconsent #

The QT i downloaded is 4.8.7, which has now been updated to 5.5, but I need to configure the Cgal (x64) library to rely only on qt4.x.

CMake Download: https://cmake.org/

It's good to download the latest.

About QT x64 under window compile, online has a lot of blog, but looked a lot, I also mainly refer to a blog (http://blog.sina.com.cn/s/blog_472a9f0c01017x1x.html), realized.

In this, I based on my own practice, and re-perfect, I hope you can make a comprehensive reference.

1. It is recommended to install the DIREXTX SDK (it seems that the compilation process detects the need for this)

Links: https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812

2. Compiling qt>=4.8 requires Perl to be installed, the ActivePerl version is downloaded, and the test is useful.

Links: http://www.perl.org/get.html

3. Download qt has code, small edition download 4.8.7, and load it into E:\Libraries\qt-everywhere-opensource-src-4.8.7.

4. Setting Environment variables

qtdir=e:\libraries\qt-everywhere-opensource-src-4.8.7
qmakespec=win32-msvc2010

5. Again path environment variable, add value E:\Libraries\qt-everywhere-opensource-src-4.8.7\bin

6. Start the command line tool that comes with vs2010. Start > Programs > Microsoft Visual Studio > Visual Studio Tools > Visual Studio X64 Command Prompt. If you update the environment variables, you will need to restart the visual Studio X64 Command Prompt

7. Next in Visual Studio X64 Command prompt, first through the CD statement, into the QT installation directory, here is

E:cd

CD E:\Libraries\qt-everywhere-opensource-src-4.8.7

Configure for all QT components:

Configure-debug-and-release-opensource-platform win32-msvc2010

After the 8.configure is over, NMAKE. Compile for a long time and wait patiently.

9. After compiling, there is a common lib,dll in Lib. Here we are the debug and release versions are compiled, so the directory will appear

The problem is, in the visual Studio X64 Command prompt input nmake to compile the way, the error (seemingly a problem with the online compilation) is not easy to access.

Then, the small part of the step 8, the replacement process using Virtual Studio IDE load Projects.sln, and then build solution. However, the debug and release versions are set. If this error occurs, you can check it by error lists and modify the source code accordingly. Step 1-7 does not change. Step 7configure is still necessary, if there is no configure, the source root directory will not appear Projects.sln.

At the same time, when the small part of the test, using NMAKE to compile, and then the bin directory did not generate assistant.exe,designer.exe these tools, but through the VS2010 IDE to build, Then all the tools are generated (the small guess is that VS2010 can combine all the libraries together to compile). So, it is recommended to use the IDE to compile, errors will be able to locate quickly. (Tips: If you need to run Assistant.exe,designer.exe, you need to debug compile, not yet know the answer)

Of course, there are some errors in compiling with the VS2010 IDE. WebKit the library to make an error. Small series because of the time relationship, not to fix these source code bug, and so on in the future, please forgive us. However, most libraries are normal to use.

This blog also refer to the following links:

QT Installing

Http://qt-project.org/doc/qt-4.8/installation.html

Installing Qt for Windows

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

Http://www.yaoguangkeji.com/a_Y0jJvrm0.html

qt4.8.7 source code in the WIN7+VS2010 Environment x64 compilation (QT 64-bit)

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.