1

嗨,我有一个 VS2010 项目女巫,我从一台机器移到另一台机器。而在新机器上,QT 安装在不同的位置。

现在项目找不到 QT 头文件和库。当我查看项目属性时,我看到所有 QT 路径都是用 makro $(QTDIR) 设置的,这个路径是旧机器的路径。有什么办法可以改变makro的值吗?

寻求帮助

道具经理

4

2 回答 2

3

There is such thing as User Macros in VS 2010. It can be defined in Property Sheets. To find it you should open View->Property Manager panel, and there you'll see your projects and configurations. It will look like this:

enter image description here

In my project, I have a foldernames property sheet, in QT the name might be different. So you should right-click the property sheet and you'll see User macros page under Common properties:

enter image description here

Check there for your QTDIR macro.

于 2012-08-31T07:31:29.343 回答
2

我相信 QTDIR 是您需要在 Windows 上定义的系统/用户变量。您可以看一下: http: //support.microsoft.com/kb/310519,它解释了如何设置该值。

或者,你可以看看:http ://www.itechtalk.com/thread3595.html

设置变量后,您可能需要重新启动 Visual Studio

要检查变量是否已设置,请在命令提示符下键入以下内容: echo %QTDIR%

于 2012-08-31T07:26:57.993 回答