Compilation of Cuda example programs fails with errors

I have an Asus Z97-WS motherboard with a i7-4790K processor and an ASUS GTX780-Ti video card. I am running Windows 7 Professional, 64 bit with Visual Studio Professional 2013.

Among the errors during compilation of the supplied Cuda programs is:

error C1083: Cannot open include file: ‘d3dx9.h’: No such file or directory.

No only that but I also received 199 warnings about datatype conversions.

Not very encouraging for the first time.

The D3D samples generally require other components to be installed before they can be compiled (and this is true for other sample types, as well, such as MPI samples).

This is covered in the documentation:–vertex-array-

If you attempt to compile these samples without having installed the necessary components, you will get compile errors.

If the warnings are a problem, you could file a bug concerning those:

@Robert_Crovella I have DirectX 12 installed on my Windows 10 computer but still get the error “cannot open the file d3dx10.h”. What should I do to resolve this? What are the other components I need to install, the links you shared above do not specify anything clearly

It likely just means you haven’t set up your include path in VS correctly.

  1. Use a windows utility such as the file manager to find the exact location of d3dx10.h on your system. It should have been installed if you actually installed a recent directX SDK (such as DX12 SDK, if that is what you meant by “I have DirectX 12 installed”). If you don’t have a directX SDK installed, then you need to install one. You can easily find instruction on the web for doing this.

  2. Once you have located the location of d3dx10.h on your system, google the web for your particular VS version to find instructions for updating a VS project with a particular include path. Use the path obtained in step 1 to make that change to your project. That should resolve it.

@Robert_Crovella thanks for the complete answer. I managed to follow these steps and build the deviceQuery program. I still needed some files for some other programs like simpleMPI (got error “cannot open include file mpi.h”) but I got what I needed to do. Thank you!