标题:Qt4 with Visual Studio
作者:andy212
日期:2006-04-21 12:23
内容:
Qt4 with Visual Studio
注意:虽然用vc6.0的编译器也能生成QT,但只能在命令行模式下使用(nmake),不能够结合vc6.0的IDE一块使用(虽然能生成.dsp文件,但是却用不了。我试过很多次,都用不了,不知道各位怎么样?)。没办法,我就装了vc.net2003试试,没想到还挺顺利的:-)
现在把编译的过程介绍如下,大部份都是转载的,只是修改了很小一部分。
From qtnode
Contrary to popular belief, you can use Qt4 with Visual Studio to create Open Source software.
These instructions are for Qt 4.1.2. 对于Qt的其他版本,方法类似,只是要下载相应的补丁。补丁见附件!
Contents
1 Building Qt
1.1 Obtain and install the Qt source
1.2 Download and install the patch allowing Qt to be compiled with Visual Studio compilers
1.3 Open a command prompt in the Qt source directory
1.4 Patching the Qt sources
1.5 Configuring your Qt install (and building qmake)
1.6 Building the Qt library
2 Setting up your environment
3 Testing your install
4 Creating Visual Studio projects
5 Maintaining Visual Studio Projects
6 Additional Info
Building Qt
注意:
1.对于Windows Server 2003 来说,要先下载 Windows® Server 2003 R2 Platform SDK (不知道别的操作系统怎样?)
2.设置相应的环境变量path, lib, include.具体环境变量的设置,可以看 http://www.cs.usask.ca/grads/wew036/latex/env.html 。我设成了:
path:
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Qt\4.1.1-msvc.net\bin
lib:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\;C:\Qt\4.1.1-msvc.net\lib;C:\WINDOWS\system32;c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib
include:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\include\;C:\WINDOWS\system32;C:\Qt\4.1.1-msvc.net\include;c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include
Obtain and install the Qt source
To start, download the source package: Download Qt..
#1 [cauc_dg 10-27 16:25]
两个小时。。。QT是出来了,但后面的hello程序产生不了.net的.vcproj啊,没反应,这是怎么个一回事捏?