开发者

Including Platform SDK in QT Creator

I reference a few includes that have a dependency on the platform sdk. When I add the following line to my QT Creator Pro 开发者_开发知识库file and try to compile it throws confusing errors:

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/oaidl.h:442: error: pasting "/" and "/" does not give a valid preprocessing token

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/propidl.h:310: error: pasting "/" and "/" does not give a valid preprocessing token

c:\Program Files\Microsoft Platform SDK\Include/oaidl.h:442: error: expected unqualified-id before '/' token

c:\Program Files\Microsoft Platform SDK\Include/oaidl.h:457: error: expected unqualified-id before '/' token

c:\Program Files\Microsoft Platform SDK\Include/propidl.h:310: error: expected unqualified-id before '/' token

Any help is greatly appreciated


Try to replace \ by /.


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. This applies to the Windows SDK 8.0 (November 2012) iteration of winnt.h

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.

intelsixtyfourbitbuild:DEFINES += _M_IA64

leaving out the portion from start to colon (:) inclusive, defines regardless of build.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜