码迷,mamicode.com
首页 > Windows程序 > 详细

在win7下配置DirectX11的开发环境

时间:2016-04-13 23:56:45      阅读:558      评论:0      收藏:0      [点我收藏+]

标签:

先在微软官网下载 “DirectX Software Development Kit”,然后安装。如果之前安装过 Visual C++ 2010 Redistributable Package ,需要先卸载掉,否则SDK会安装失败。

安装成功后就可以打开vs进行项目配置了:

Modify the project’s VC++ directories as follows to use the right order for SDK headers and libraries.

 

i. Open Properties for the project and select the VC++ Directories page.
ii. Select All Configurations and All Platforms.
iii. Set these directories as follows:
  • Executable Directories: <inherit from parent or project defaults> (On right-side drop-down)
  • Include Directories: $(IncludePath);$(DXSDK_DIR)Include
  • Include Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x86
iv. Click Apply.
v. Choose the x64 Platform.
vi. Set the Library Directory as follows:
  • Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x64
 1 //Include and link appropriate libraries and headers//
 2 #pragma comment(lib, "d3d11.lib")
 3 #pragma comment(lib, "d3dx11.lib")
 4 #pragma comment(lib, "d3dx10.lib")
 5 
 6 #include <windows.h>
 7 #include <d3d11.h>
 8 #include <d3dx11.h>
 9 #include <d3dx10.h>
10 #include "xnamath.h"

 

Where is the DirectX SDK?

directxtutorial

DX11Lessons

在win7下配置DirectX11的开发环境

标签:

原文地址:http://www.cnblogs.com/codingdiary/p/5389305.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!