Cicada
Cicada

Reputation: 310

D3DCompiler Unresolved Extern

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?

Upvotes: 1

Views: 3897

Answers (1)

Cicada
Cicada

Reputation: 310

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.

Upvotes: 3

Related Questions