What can cause visual studio to be unable to compile a Directx11 project?

Started by
3 comments, last by DJTN 11 years, 10 months ago
[color=#000000][font=arial, helvetica, sans-serif]

When I played around with sample Directx9 projects from tutorial sites,they would run with no problem,but whenever I try to compile a Directx11 project,I get [/font]
error MSB6006: "cmd.exe" exited with code 9009[/quote]
Is there a way to fix this?Do I need some kind of patch for VS?
(I'm using Visual Studio 2010 on Windows 7 64 bit.)

Advertisement
Don't assume that VS is broken and needs patching - it's most likely your code and/or project settings. Why are you running it under a command shell? You'll need to post some code so that people can see what you're doing and comment further.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.


Don't assume that VS is broken and needs patching - it's most likely your code and/or project settings. Why are you running it under a command shell? You'll need to post some code so that people can see what you're doing and comment further.


I'm using Frank Luna's directx11 sample: http://www.d3dcoder.net/d3d11.html

Pretty much all of them give me this error,I'm trying to compile the GeometryShader example right now in Part1.
This is most likely caused by missing executables under the build phase. Probably fxc.exe which is the DirectX effects compiler.

Do the following in VS2010:

Project -> Properties -> Configuration Properties -> VC++ Directories.

In "Executable Directories", add the path to the DirectX utilities bin folder, which is typically: "\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Utilities\bin\x86". Be sure to check what it is exactly for your installation of DirectX. This folder contains fxc.exe and much more.
Apply changes and re-compile.

Other possible causes:
- Include directories
- Library directories
- Platform Toolset under Configuration Properties -> General, should be v100 or Windows7.1SDK.

All of the latter three possible causes have similar fixes to the first one described above, namely to specify the correct paths.
Frank precompiles the effects before use. Amandip's first suggestion should work.

This topic is closed to new replies.

Advertisement