I am writing an application using DirectX SDK in C ++. Everything was fine until I started writing support for shaders in my application. When building a project, the following error occurs:

enter image description here

I guess this is somehow related to the name of the file d3d12shader.h , usually I did not use d3dx12 , but d3dx11 . Maybe because of compatibility or something.

The error refers me to this piece of code d3d12shader.h

enter image description here

Application code: https://pastebin.com/Zetad5y1

  • Do you have a header file d3dcommon.h ? This is D3D_INTERPOLATION_MODE , D3D_MIN_PRECISION and D3D_PARAMETER_FLAGS . - ߊߚߤߘ
  • @Arhad In d3d11shader.h or in my headlines? - yakute
  • In all your header files where these types are used. - ߊߚߤߘ
  • The file is called D3d12shader.h , where did you get the d3dx12shader.h ? - VTT
  • @Arhad d3dcommon.h included in D3d12shader.h . - VTT

1 answer 1

Solved the problem by removing include <d3dcompiler.h> and replacing it with #pragma comment(lib,"d3dcompiler.lib")