0

I get the LNK2019 error when I try to use D3DX11CompileFromFile function in my C++ project. The error reads:

Error 1 error LNK2019: unresolved external symbol _D3DX11CompileFromFileW@44 referenced in function "void __cdecl InitPipeline(void)" (?InitPipeline@@YAXXZ) C:\Users\Username\Documents\Visual Studio 2013\Projects\Window0\Window0\Window0.obj Window0'

I also can't open d3dx11.lib and 10 even after changing the address and dependency settings for what it's worth. I have tried moving the files around and changing user rights but I still can't get the sweet thing to work.

Help would be appreciated!

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52

1 Answers1

0

The D3DX library has been deprecated in DirectX 11. Unless you absolutely need it, you should instead use D3DCompileFromFile or compile the shaders offline with the fxc.exe shader compiler.

If you do need the D3DX library, you'll need to install the June 2010 DirectX SDK and update your Visual Studio paths. See this article: Where is the DirectX SDK?

megadan
  • 1,823
  • 12
  • 18
  • There is now a new option: You can use the [Microsoft.DXSDK.D3DX](https://www.nuget.org/packages/Microsoft.DXSDK.D3DX) NuGet package instead of the legacy DirectX SDK. That said, D3DX11 is still deprecated so you should still look at the various [replacements](https://walbourn.github.io/living-without-d3dx/). – Chuck Walbourn Mar 08 '21 at 08:54