Geeks With Blogs

News
Vitaly Dilmukhametov

Recently I found interesting “feature” of fxc compiler (it’s a part of MS DirectX SDK). When you try to compile shaders, and path to source code contains non-Latin characters, you’ll get error like following:

Error 1 The command ""%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T vs_2_0 /O3 /Zpr /Fo "f:\импортер\SilverlightApplication1\Shaders\vertexshader.vs" "f:\импортер\SilverlightApplication1\Shaders\vertexshader.hlsl"
"%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T ps_2_0 /O3 /Zpr /Fo "f:\импортер\SilverlightApplication1\Shaders\pixelshader.ps" "f:\импортер\SilverlightApplication1\Shaders\pixelshader.hlsl"" exited with code 1.

As you can see, highlighted part of paths contains Cyrillic symbols. When I rename “импортер” to “Importer”, it compiled ok.

 

So, to avoid problems I recommend you do not use non-Latin characters in the path ;)

Posted on Wednesday, August 10, 2011 10:10 AM HLSL , shader , hint , FXC , DirectX SDK | Back to top


Comments on this post: [Solving]: FXC.exe shader compiler “…exited with code 1”

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
Will it work with another than English encoding exluding Russian? For example, Chinese.
Left by Sergey Zwezdin on Aug 10, 2011 10:16 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
Special for you, Sergey, I tried to put sources to the path with Chinese characters. And I got the same error:

Error 1 The command ""%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T vs_2_0 /O3 /Zpr /Fo "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\vertexshader.vs" "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\vertexshader.hlsl"
"%DXSDK_DIR%Utilities\bin\x86\fxc.exe" /T ps_2_0 /O3 /Zpr /Fo "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\pixelshader.ps" "C:\百度百科\WindowsGame1\SilverlightApplication1\Shaders\pixelshader.hlsl"" exited with code 1. SilverlightApplication1

So, I think it's a common issue for any path, containing non-Latin symbols!
Left by Vitaly Dilmukhametov on Aug 10, 2011 11:28 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
Hm. I very disappointed with situation with Chinese. I can understand why not supported Russian, but why Chinese?
Do you know any workaround how to use Chinese in path to shaider files?
Left by Sergey Zwezdin on Aug 10, 2011 11:32 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
Sergey, you are big fan of Chinese, as I can see =)
You can put fxc.exe to the shader's dir, and don't use full path names - I think, it'll be enough!
Left by Vitaly Dilmukhametov on Aug 10, 2011 11:39 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
It's a good solution. Thank you very much.
But in my case fxc.exe is a executable file, but shader is a data. It is a different semantic. I don't want to mix this in a one place. Exec != data (!!1)
May be you know any other solution?
Left by Sergey Zwezdin on Aug 10, 2011 11:43 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
My previous suggestion is not solution - it's only workaround.
There are no solutions in this case - only workarounds, which is not TRUE (Stanky can accept it).
Left by Vitaly Dilmukhametov on Aug 10, 2011 11:47 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
May be exist alternate tools?
Workarounds are not good real projects.
Left by Sergey Zwezdin on Aug 10, 2011 11:49 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
May be.. I don't know, may be you can suggest some sort?
Left by Vitaly Dilmukhametov on Aug 10, 2011 11:54 PM

# re: [Solving]: FXC.exe shader compiler “…exited with code 1”
Requesting Gravatar...
No ideas.
Just one - stop to using fxc.exe and search alternate tool. Or write myown.
Left by Sergey Zwezdin on Aug 11, 2011 8:57 AM

Your comment:
 (will show your gravatar)


Copyright © Vitus | Powered by: GeeksWithBlogs.net