D3DCompiler未解析外部 [英] D3DCompiler Unresolved Extern
问题描述
我在Visual Studio 2012中链接项目时遇到以下问题。从Effects11.lib调用函数,但是在链接时收到以下错误:
I'm having the following problem linking a project in Visual Studio 2012. I call a function from Effects11.lib, but I receive the following error when linking:
1> Effects11.lib(EffectAPI.obj):error LNK2019:未解析的外部
符号_D3DCompileFromFile @ 36在函数中引用
_D3DX11CompileEffectFromFile
1>Effects11.lib(EffectAPI.obj) : error LNK2019: unresolved external symbol _D3DCompileFromFile@36 referenced in function _D3DX11CompileEffectFromFile
由于某种原因,它似乎无法链接到D3DCompiler。这是项目中的一组自动链接库:
For some reason it can't seem to link with D3DCompiler. Here is the set of auto linked libraries in the project:
#pragma comment(lib, "Effects11.lib")
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3dx11.lib")
#pragma comment(lib, "DxErr.lib")
#pragma comment(lib, "D3DCompiler.lib")
#pragma comment(lib, "dxguid.lib")
我已经验证,我建立在32位,我使用x86包括。我读的一切建议我已经试过的东西。任何想法?
I have verified that I'm building in 32 bit and am using the x86 include. Everything I read suggests things I've already tried. Any ideas?
推荐答案
这是我解决的方法:
默认的效果项目包括Windows开发工具包(C:\Program Files(x86)\Windows Kits \8.0为我)。在放置DirectX SDK路径之后,这个问题已修复。
The default Effects project was including the Windows dev kit (C:\Program Files (x86)\Windows Kits\8.0 for me). After putting the DirectX SDK path first, this problem was fixed.
这篇关于D3DCompiler未解析外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!