gpt4 book ai didi

c++ - Visual C++ 2010 速成版 : How to use with Qt?

转载 作者:IT老高 更新时间:2023-10-28 23:02:12 24 4
gpt4 key购买 nike

我对让 Qt 与 Visual Studio Express 一起工作感到困惑。大多数在线搜索都找到了使用以下指令编译 Qt 的指令:

  • Install MSVC2005 or MSVC2008
  • Install the most recent Platform SDK (@ MSDN: "Platform SDK for Windows Server 2003 R2")
  • From the Platform SDK, you'll need to install at least the base + internet options
  • Then, download and extract a recent snapshot or the preview release to D:\Qt\4.x.x
  • Open up a console with the MSVC settings loaded (see MSVC Tools-menu) and go to your Qt directory
  • Type "configure -platform win32-msvc2005" without the quotation marks
  • That will build you the project files you'll need
  • After that, it's as simple as running "nmake" and drinking a lot of coffee

Then, add D:\Qt\4.x.x\bin and D:\Qt\4.x.x\lib to your path environment variable, and you'll be able to use this version of Qt from everywhere on your system. The latter could be added to the library section in the options from MSVC as well.

(来自 http://www.qtcentre.org/threads/11710-Visual-Studio-2005-Express)

但是,当我转到 Qt 的下载页面 ( http://qt.nokia.com/downloads ) 时,有一个 Visual Studio 的下载标签:"Qt 库 4.7.1 for Windows (VS 2008, 228 MB)"

我很困惑,我真的还需要构建它吗?还是已经建好了?

最佳答案

使用来自 qt 的可下载 exe (http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.1-vs2008.exe) 似乎不适用于 Visual Studio 2010。我尝试从无法运行的命令行构建一个简单的 hello world 程序。我将重复上一个答案的评论。

I tried the hello world example from doc.qt.nokia.com/4.7/gettingstartedqt.html. I was able to build the project and an exe is generated. However, the exe fails to run and generates a system error dialog box about "side-by-side configuration is incorrect...". I ran SxsTrace and it says:

...
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\ 9.0.21022.8__...\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\qthello\debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86", publicKeyToken="...",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

To me, it looks like its trying to use VS2008 (which I don't have). It makes sense I guess since the download is for VS2008.

当我提出这个 SO 问题并且编译完成时,我正在使用我的问题中的说明(但是使用 win32-msvc2010 作为我的平台目标)编译 qt 4.7.1。我重建了 hello world 项目并运行了 exe。因此,似乎答案是为了与 Visual Studio Express 2010 一起使用,您当前确实需要编译(至少在 Qt 发布 VS2010 下载选项之前)。不过,我相信如果你使用的是VS2008,那么你就不需要编译了。

关于c++ - Visual C++ 2010 速成版 : How to use with Qt?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5098887/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com