문제

During the linking process, Visual Studio tells me that D3DCompileFromFile is an unresolved external symbol.

error LNK2019: unresolved external symbol _D3DCompileFromFile@36

My program compiles fine, but fails when it's linking. I've currently got my (Project properties->Configuration properties->Linker->General->) additional library directories set to: $(WindowsSDK_LibraryPath_x86)

Please could someone let me know what I'm missing.

Also, do you need the DirectX SDK? I've got it, but I've read things about Windows 8 pretty much coming with it.

Edit: Also just noticed I get it for D3D11CreateDeviceAndSwapChain too.

error LNK2019: unresolved external symbol _D3D11CreateDeviceAndSwapChain@48

Thanks.

도움이 되었습니까?

해결책

You need to link against D3DCompiler.lib (and d3d11.lib). This library is part of what was known as the DirectX SDK, which is now integrated in the Windows SDK.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top