我如何使VS2010喜欢一个包括目录在另一个? [英] How do I make VS2010 prefer one include directory over another?

查看:130
本文介绍了我如何使VS2010喜欢一个包括目录在另一个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用DirectX SDK中的 XInput.h 文件,但此文件也存在于Windows SDK中(它是文件的不同变体)。

I'm trying to use the XInput.h file from the DirectX SDK, but this file also exists in the Windows SDK (and it's a different variation of the file).

我已经尝试在项目设置中的Include Directories中添加 $(DXSDK_DIR)Include; 之前和之后 $(IncludePath)只是为了让它工作。

I've tried adding $(DXSDK_DIR)Include; to the Include Directories in the project settings, before and also after $(IncludePath) just to try and make it work.

程序使用DirectX SDK版本不知何故,但清洗后,它回到使用Windows SDK版本...它只是似乎几乎随机,是吗?

I got VS to compile my program using the DirectX SDK version somehow, but after cleaning it went back to using the Windows SDK version... it just seems almost random, is it?

推荐答案

我有同样的问题尝试使用Visual Studio 2010年8月DirectX SDK(DirectDraw)。

I had the same problem trying to use the August 2007 DirectX SDK (for DirectDraw) with Visual Studio 2010.

我最后做的是删除所有默认的包含路径,并且只在包含列表中指定DirectX SDK路径,然后检查包括框架SDK的固有的父级或项目默认值。

What I ended up doing was removing all of the default include paths, and only specifying the DirectX SDK path in the include list, then checking "Inherent from parent or project defaults", which includes the framework SDK.

为我工作,希望这有助于。

Worked for me, hope this helps.

这篇关于我如何使VS2010喜欢一个包括目录在另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆