windows XP编译Qt4.8.0错误

40 篇文章 0 订阅

编译器是mingw32-gcc-4.4.0

Perl not found in environment - cannot run syncqt.


解决方法:You can either go to into the Qt folder and look for a directory called bin and delete these two files:
    syncqt
    syncqt.bat

Or download and install Perl from ActivePerl *note once you have installed Perl you must close and reopen the Visual Studio 2010 command prompt, and make sure you select the one that starts the Intel Compiler.


摘自:http://jamiehutton.com/tag/4-8-0/

Building Qt 4.8.0 with Intel Compiler

Posted on December 20th, 2011 by Jamie Hutton

Qt has just released the latest version 4.8.0, if you would like to compile this version using an Intel Compiler the steps are listed below.

Requirements

  • Visual Studio 2010 or 2008
  • Intel Compiler 12.1

I assume you will have these two pieces of software already installed, if not do install them now :) .

Downloading Qt 4.8.0

To start you will need to download the source code as a zip by going to the Qt Download page.

qt download page

****Extract the contents of the zip to anywhere you like, but make sure the length of the path is not too long. Otherwise you will get an error randomly throughout your Qt build, and it might happen hours after you started!

NMAKE : fatal error U1077:

Building Qt

You will now need to go to your start bar and open a program called IA-32 Visual Studio 2010 mode.

Intel command prompt 2010

This is a special command prompt which has all the variables set for building with Visual Studio 2010 tools using the Intel Compiler.

You will now need to change directory to the location of the Qt configure.exe. An example of the location of mine is show below.

1
cd C:\qt-4.8.0\

Once you have done that you need to choose a platform to select win32 with the Intel Compiler simply type:

1
configure -platform win32-icc

To select a win64 platform with the Intel Compiler, you will want to open the Intel 64 Visual Studio 2010 mode command prompt instead and run:

1
configure -platform win64-icc

If you want to make a more streamline build you may want to consider some of the following options:

1
2
3
4
5
6
7
-no-qt3support        //Disables the qt 3 support functionality
-no-opengl            // Disables OpenGL functionality
-mp                   // use multiple processors for compiling
-ltcg                 // This tells the linker to call the compiler
                       // and perform whole program optimization
                       // which may improve performance however
                       // increase the time to build release builds

Now at this point if the console returns:

Perl not found in environment - cannot run syncqt.

You can either go to into the Qt folder and look for a directory called bin and delete these two files:

syncqt
syncqt.bat

Or download and install Perl from ActivePerl *note once you have installed Perl you must close and reopen the Visual Studio 2010 command prompt, and make sure you select the one that starts the Intel Compiler.

Once configure is successful the console will return:

Qt is now configured for building. Just run nmake.
To reconfigure, run nmake confclean and configure.

Finally to build the Qt library type

1
nmake

This will start building the entire of Qt using the Intel Compiler which takes a little while, possibly 12-16 hours depending on your machine. However, this is normal I suggest you go to sleep!

Setting environment variables

Basically, we are done you now have compiled Qt with an Intel Compiler :) . All you need to do is to set your environment variables (QTDIR and PATH), which tell programs where to find Qt. If you are on Windows 7, you can use the following command to set QTDIR to your installation dir.

1
setx QTDIR c:\Qt-4.8.0

Also add the Qt/bin to your PATH.

You can now install the Visual Studio Add-in, and start a Qt project.

Enjoy!



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值