如何解决DirectX依赖关系(发行/调试版本) [英] How to solve DirectX dependencies (release/debug version)

查看:139
本文介绍了如何解决DirectX依赖关系(发行/调试版本)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我已经使用DirectX 10编写了一个简单的应用程序.一切正常.但是我已经将我的应用程序移至另一台计算机并尝试运行它.然后信息弹出,我需要一个D3DX10d_42.dll文件.我不想在那台计算机上安装DirectX.所以我已经复制了这个dll,一切都很好.

我的问题是为什么我需要此DLL的调试版本?

它不适用于D3DX10_42.dll.我很确定我已经编译了应用以发布版本(大约81kB,调试大约需要405kB).

提前谢谢,
Paul

Hi,
I have written a simple app using DirectX 10. Everything works fine. But I have moved my app to other computer and try to run it. Then info has popped up that I need a D3DX10d_42.dll file. I don’t want to install DirectX on that computer. So I have copied this dll and it''s fine.

My question is why I need debug version of this dll?

It doesn’t work with D3DX10_42.dll. I’m pretty sure that I have compiled app to release version (about 81kB and the debug takes about 405kB).

Thx in advance,
Paul

推荐答案

程序使用的DLL的哪个版本取决于程序实际链接到的库的内部版本.

您可能需要检查链接器设置,并确保在Release中未与调试库链接,或者检查代码中是否有任何#pragma comment(lib, "...")并确保使用正确的代码.

我个人有:
Which version of the DLL that your program is using depends on which build of the library your program actually linked to.

You may either need to check your linker settings and make sure that in Release you are not linking with the debug lib or check your code for any #pragma comment(lib, "...") and make sure you use the correct one.

Personally I have this:
#ifdef _DEBUG
#pragma comment(lib, "d3dx9d.lib")
#else
#pragma comment(lib, "d3dx9.lib")
#endif



这样,相关版本便与构建链接在一起.我将其设置为实际设置,但我将其保留在SVN上,这对我来说稍微容易一些.



So that the relevant version is linked with for the build. I''d put it in the actual settings but I keep the stuff on SVN and this works out as a little easier for me.


这篇关于如何解决DirectX依赖关系(发行/调试版本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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