由于缺少Directx9库而构建错误,需要directx 9库吗? [英] Build error due to missing Directx9 libs, need directx 9 libs?

查看:93
本文介绍了由于缺少Directx9库而构建错误,需要directx 9库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了一个开源游戏并想根据我的需要进行修改。它在资源文件中有以下代码:

Hi, I have downloaded a open source game and want to modify it according to my need, It has following code in resource file:

// Main Include Headers.
#include <stdio.h>		// Required header for sprintf() & sprintf_s().

#define DIRECTINPUT_VERSION 0x0800

// Direct3D
#include <d3d9.h>
#include <d3dx9.h>
#include <dinput.h>

// The library files for Direct 3D9.
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma comment (lib, "dxguid.lib")
#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")

// Standard Template Library.
#include <vector>
using std::vector; // Used for random access.
#include <list>
using std::list; // Used for iteration.
#include <string>
using std::string;
#include <map>
using std::map;
using std::pair;

// Macro Include Headers.
#include <assert.h>

// Custom Macros.
#ifndef SAFE_RELEASE
#define SAFE_RELEASE(p)	if (p) { p->Release(); p = NULL; }
#endif

#ifndef DXERROR
#define DXERROR(a)	{ OutputDebugString(a); return false; }
#endif

#ifndef DIERRBOX
#define DIERRBOX(a) { MessageBox(m_hWnd, a, "DirectInput Error", MB_OK | MB_ICONEXCLAMATION); return false; }
#endif

// #defines.
#define WINDOW_WIDTH	1024			//	Window Width.
#define WINDOW_HEIGHT	768				//	Window Height.

#endif /* CRESOURCEHEADER_H_ */





似乎我需要DIRECTX 9库,这就是我的代码给出构建错误的原因。
任何人都可以帮我提供DirectX9库(或sdk)或者什么链接需要什么?



提前致谢:)



It seems that I need DIRECTX 9 libs, this is why my code is giving building errors.
Can any one help me giving the links od DirectX9 libs (or sdk) or what ever needed?

Thanks in advance :)

推荐答案





我认为您需要DirectX SDK - http:/ /www.microsoft.com/en-us/download/details.aspx?id=23549 [ ^ ]



下载完整的DirectX SDK,其中包含DirectX Runtime和创建DirectX兼容应用程序所需的所有DirectX软件。
Hi,

I think you need the DirectX SDK - http://www.microsoft.com/en-us/download/details.aspx?id=23549[^]

Download the complete DirectX SDK, which contains the DirectX Runtime and all DirectX software required to create DirectX compliant applications.


这篇关于由于缺少Directx9库而构建错误,需要directx 9库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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