DirectX compilation error: error MSB6006: “fxc.exe

2019-07-30 02:03发布

I am learning DirectX11 but can't get around this problem when compiling the project:

Error 1 error MSB6006: "fxc.exe" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 1126 5 DirectX

I am using Visual Studio 2013, DirectX 11, and the Effects framework.

I've searched the internet and did every single thing that they suggested such as properly setting the HLSL Compiler with fx as shader type and 5_0 as shader model. The include, lib and bin directories are properly set. There is a question on the topic here but it's not answered properly so I figured someone could explain how to overcome it now.

Thank you in advance.

1条回答
不美不萌又怎样
2楼-- · 2019-07-30 02:59

You should configure HLSL file correctly. It means shader model(3.0, 4.0, 5.0), shader types(PS, VS, GS, or general just FX(with entry point if u got it) ....). fxc.exe is HLSL compiler which compiles your shader code, but it seems entire compiler is not targeted on right shader file(s). As well error says to you that compiler execution had been exited with result 1 , now you should click on shader(s) file with right mouse button and configure your shader that's it. Hope this helps.

P.S. Oh and which version of Windows do you use ? because it's matter how would you talking with DirectX SDK ? This is important.

查看更多
登录 后发表回答