简体   繁体   English

在QT Creator中包含Platform SDK

[英]Including Platform SDK in QT Creator

I reference a few includes that have a dependency on the platform sdk. 我引用了一些依赖于平台sdk的内容。 When I add the following line to my QT Creator Pro file and try to compile it throws confusing errors: 当我将以下行添加到我的QT Creator Pro文件中并尝试对其进行编译时,会引发混乱的错误:

INCLUDEPATH += "C:\\Program Files\\Microsoft Platform SDK\\Include"

The errors are: 错误是:

c:\\Program Files\\Microsoft Platform SDK\\Include/winnt.h:666: error: #error Must define a target architecture. c:\\ Program Files \\ Microsoft Platform SDK \\ Include / winnt.h:666:错误:#error必须定义目标体系结构。

c:\\Program Files\\Microsoft Platform SDK\\Include/oaidl.h:442: error: pasting "/" and "/" does not give a valid preprocessing token c:\\ Program Files \\ Microsoft Platform SDK \\ Include / oaidl.h:442:错误:粘贴“ /”和“ /”没有给出有效的预处理令牌

c:\\Program Files\\Microsoft Platform SDK\\Include/oaidl.h:457: error: pasting "/" and "/" does not give a valid preprocessing token c:\\ Program Files \\ Microsoft Platform SDK \\ Include / oaidl.h:457:错误:粘贴“ /”和“ /”没有给出有效的预处理令牌

c:\\Program Files\\Microsoft Platform SDK\\Include/propidl.h:310: error: pasting "/" and "/" does not give a valid preprocessing token c:\\ Program Files \\ Microsoft Platform SDK \\ Include / propidl.h:310:错误:粘贴“ /”和“ /”没有给出有效的预处理令牌

c:\\Program Files\\Microsoft Platform SDK\\Include/oaidl.h:442: error: expected unqualified-id before '/' token c:\\ Program Files \\ Microsoft平台SDK \\ Include / oaidl.h:442:错误:'/'标记之前的预期unqualified-id

c:\\Program Files\\Microsoft Platform SDK\\Include/oaidl.h:457: error: expected unqualified-id before '/' token c:\\ Program Files \\ Microsoft平台SDK \\ Include / oaidl.h:457:错误:'/'标记之前的预期unqualified-id

c:\\Program Files\\Microsoft Platform SDK\\Include/propidl.h:310: error: expected unqualified-id before '/' token c:\\ Program Files \\ Microsoft Platform SDK \\ Include / propidl.h:310:错误:'/'标记之前的预期unqualified-id

Any help is greatly appreciated 任何帮助是极大的赞赏

尝试用/替换\\。

I can explain the first error. 我可以解释第一个错误。 winnt.h is expecting a #define of any of the following, and more, corresponding to the target architecture: _M_IX86 _M_IA64 _M_AMD64 _M_ARM there are a number of these. winnt.h期望与目标体系结构相对应的以下任何一个#define,以及更多的#define:_M_IX86 _M_IA64 _M_AMD64 _M_ARM有许多这样的名称。 This applies to the Windows SDK 8.0 (November 2012) iteration of winnt.h 这适用于winnt.h的Windows SDK 8.0(2012年11月)迭代

You can define this in the project file (rather than in your code), which may be useful if you have different build configurations. 您可以在项目文件中(而不是在代码中)定义它,如果您使用不同的构建配置,这可能会很有用。 Add a similar line to your project (.pro) file. 将类似的行添加到您的项目(.pro)文件。

intelsixtyfourbitbuild:DEFINES += _M_IA64

leaving out the portion from start to colon (:) inclusive, defines regardless of build. 忽略从开始到冒号(:)(包括首尾)的部分,定义与构建无关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM