VC 2005/2008 QT 安装

VC2005:

1. 安装Visual C++ Express Edition 2005

2. 安装Microsoft Platform SDK for Windows Server 2003 R2--Visual C++ Express Edition 2005本身不含windows sdk。下载地址:http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en

3. 安装QT。目前最新版本为4.5.0. 下载地址:http://www.qtsoftware.com/downloads 安装目录为c:/qt/4.5.0

4. 设置编译QT

a)打开命令行

设置VC变量:  C:/Program Files/Microsoft Visual Studio 8/Common7/Tools/vsvars32.bat

设置SDK变量: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/SetEnv.Cmd  

配置QTcd c:/qt/4.5.0

               configure -platform win32-msvc2005 -debug -no-dsp –vcproj

编译QTnmake

b)增加环境变量SYSTEM PATH c:/qt/4.5.0/lib;c:/qt/4.5.0/bin

 

5. VC增加环境变量

VC Options->Projects and Solutions->VC++ Directories:

           Include files: c:/qt/4.5.0/include c:/qt/4.5.0/include/Qt c:/qt/4.5.0/include/QtGui c:/qt/4.5.0/include/QtCore

           Library files: c:/qt/4.5.0/lib

 

6. 创建一个QT工程,在一个空白目录如 c:/qtproject/helloworld 添加一个文件main.cpp,main.cpp中加入以下代码,

           #include <QApplication>

           #include <QLabel>

  

           int main(int argc, char** argv)

          {

              QApplication app(argc,argv);

              QLabel* label = new QLabel("Hello world");

              label->show();

              return app.exec();

          } 

          打开命令行

          cd c:/qtproject/helloworld 

          qmake -project -t vcapp helloworld.pro(生成helloworld.pro)

          qmake  (生成helloworld.vcproj)

          这时就可以打开helloworld.vcproj了,编译之后若能看到以下界面出现,恭喜,QT安装成功!

VC2008:

  1. Install VC2008 Express online by vcsetup.exe.
  2. Download QT for VC2008 and install to PC.
  3. Config QT

           set vc variables    C:/Program Files/Microsoft Visual Studio 9.0/Common7/Tools/vsvars32.bat

           configure Qt         cd c:/qt /4.5.0

                              configure -platform win32-msvc2008 -debug -no-dsp -vcproj      

           compile Qt           nmake                                                                                     

 

 

  1. Write sample file main.cpp to test the installation.

 

      #include <QApplication>

      #include <QLabel>

     

      int main(int argc, char** argv)

      {

          QApplication app(argc,argv);

          QLabel* label = new QLabel("test");

          label->show();

          return app.exec();

      } 

      go to the dir which main.cpp located.

      qmake –project  

      qmake –tp vc

      open .sln to build and run the sample app.

     

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib 的目录 2009-09-06 16:17 . 2009-09-06 16:17 .. 2006-03-03 23:19 13,712 Bits.Lib 2006-03-03 23:19 4,196 credui.lib 2006-03-03 23:19 57,730 daouuid.lib 2006-03-03 23:19 527,310 ddao35.lib 2006-03-03 23:19 531,012 ddao35d.lib 2006-03-03 23:19 528,038 ddao35u.lib 2006-03-03 23:19 532,702 ddao35ud.lib 2006-03-03 23:19 14,610 WinFax.Lib 2006-03-03 23:19 206,996 GdiPlus.lib 2006-03-03 23:20 27,500 HelpCenterInterfaces.tlb 2006-03-03 23:20 64,608 HelpServiceInterfaces.tlb 2006-03-03 23:21 13,252 p2p.lib 2006-03-03 23:21 11,218 p2pgraph.lib 2006-03-03 23:21 1,380,352 atlsd.pdb 2006-03-03 23:23 121,974 WiaGuid.Lib 2006-03-03 23:23 19,212 WiaScr.Tlb 2006-03-03 23:23 10,152 esebcli2.lib 2006-03-03 23:23 129,732 cdoex.tlb 2006-03-03 23:23 26,608 cdoexm.tlb 2006-03-03 23:23 10,832 exevtsnk.tlb 2006-03-03 23:23 7,888 ActiveDS.Lib 2006-03-03 23:23 99,122 ADSIid.Lib 2006-03-03 23:23 53,222 Wldap32.Lib 2006-03-03 23:23 55,600 CDOSys.Tlb 2006-03-03 23:23 6,254 certadm.lib 2006-03-03 23:23 217,676 certidl.lib 2006-03-03 23:23 59,044 Crypt32.Lib 2006-03-03 23:23 5,516 ComSvcs.Lib 2006-03-03 23:23 75,386 DtcHelp.Lib 2006-03-03 23:23 2,106 Mtx.Lib 2006-03-03 23:23 1,734 mtxdm.lib 2006-03-03 23:23 121,030 Svcguid.Lib 2006-03-03 23:23 63,400 xaSwitch.Lib 2006-03-03 23:23 3,364 xoleHlp.Lib 2006-03-03 23:23 6,402 Icm32.Lib 2006-03-03 23:23 1,978 Icmui.Lib 2006-03-03 23:23 17,036 Mscms.Lib 2006-03-03 23:23 620,890 MMC.Lib 2006-03-03 23:23
VC2020qt是指使用Visual Studio 2020和Qt框架进行开发的环境。下面是VC2020qt安装步骤: 1. 首先,你需要下载并安装Visual Studio 2020。你可以从Microsoft官方网站上下载Visual Studio 2020 Community版本,这是免费的开发工具。 2. 在安装Visual Studio 2020时,你需要选择安装C++开发工具。确保勾选了"C++ CMake tools for Windows"和"C++ Clang tools for Windows"选项。 3. 安装完成后,你需要下载并安装Qt框架。你可以从Qt官方网站上下载Qt的最新版本。在下载页面上,选择适合你的操作系统的Qt版本,并下载安装程序。 4. 运行Qt安装程序,选择自定义安装选项。在组件列表中,确保勾选了"MSVC 2019"选项,这将为Visual Studio 2020提供Qt插件。 5. 在安装过程中,你可以选择安装其他Qt组件和工具,根据你的需求进行选择。 6. 完成安装后,打开Visual Studio 2020。在新建项目对话框中,选择"Qt"类别,并选择适合你的项目类型。 7. 在项目设置中,配置Qt的路径。在项目属性中,选择"C/C++" -> "常规",将Qt安装路径添加到"附加包含目录"中。 8. 接下来,在项目属性中,选择"链接器" -> "常规",将Qt安装路径添加到"附加库目录"中。 9. 最后,在项目属性中,选择"链接器" -> "输入",将需要使用的Qt库文件添加到"附加依赖项"中。 完成以上步骤后,你就可以开始使用VC2020qt进行开发了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值