D3DCompiler Unresolved Extern

旧街凉风 提交于 2019-12-11 12:38:02

问题


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: unresolved external symbol _D3DCompileFromFile@36 referenced in function _D3DX11CompileEffectFromFile

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")

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?


回答1:


Here's how I solved it:

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.



来源:https://stackoverflow.com/questions/15302276/d3dcompiler-unresolved-extern

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!