DirectX编译错误:错误MSB6006:“ fxc.exe”用代码1退出 [英] DirectX compilation error: error MSB6006: "fxc.exe" exited with code 1

查看:568
本文介绍了DirectX编译错误:错误MSB6006:“ fxc.exe”用代码1退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习DirectX11,但是在编译项目时无法解决此问题:

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


错误1错误MSB6006: fxc。 exe,代码1退出。C:\Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 1126 5 DirectX

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

我正在使用Visual Studio 2013,DirectX 11和Effects框架。

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

我已经搜索了Internet并完成他们建议的所有操作,例如正确设置HLSL编译器,将fx设置为着色器类型,将5_0设置为着色器模型。正确设置了include,lib和bin目录。这里有一个关于此主题的问题,但未得到正确回答,因此我认为有人可以解释现在如何克服它。

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.

请先谢谢您。

推荐答案

您应正确配置HLSL文件。它表示着色器模型(3.0、4.0、5.0),着色器类型(PS,VS,GS或常规的仅FX(如果有,则带有入口点).....)。 fxc.exe是HLSL编译器,可编译您的着色器代码,但似乎整个编译器都不针对正确的着色器文件。同样,错误告诉您,编译器执行已退出并返回结果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。哦,您使用哪个Windows版本?因为您会如何使用DirectX SDK?这个很重要。

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.

这篇关于DirectX编译错误:错误MSB6006:“ fxc.exe”用代码1退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆