With the legacy DirectX SDK, you have to set up distinct x86 vs. x64 library include paths:
In VC++ Directories for 32-bit configurations:
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x86
In VC++ Directories for 64-bit configurations:
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x64
See Microsoft Docs
For new projects you should be using Direct3D 11, and you do not need to use the legacy DirectX SDK at all.
CLICK HERE to find out more related problems solutions.