DirectX compilation error: error MSB6006: “fxc.exe” exited with code 1

半腔热情 提交于 2019-12-24 01:15:19

问题


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:


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.



来源:https://stackoverflow.com/questions/40935171/directx-compilation-error-error-msb6006-fxc-exe-exited-with-code-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!