-Bin
– contains compiled samples and some DLLs required by the samples

-win32

-Debug

-Release

-win64

-Debug

-Release

-common
– contains includes, libs, etc required by all samples

Using default VisualStudio solution files provided by
Nvidia, the output file path is such that any samples built by user in Release
mode will overwrite the pre-compiled samples provided by Nvidia. If this is not
wanted, then either copy the samples folder hierarchy and work on the copy or
change the output file path in IDE when building the sample.

** Download Cuda toolkit version suitable for your platform.

5

5.1

Choose a sample to build, e.g. oceanFFT by double clicking on its VS2010 solution file, e.g. oceanFFT_vs2010.sln. This will
automatically open the sample in Visual C++ 2010 IDE.

5.2

To build a 64 bit binary, set the project Configuration to Debug and Platform to x64 as shown in figure below. If you
want a 32 bit executable then leave the configuration to the default Win32.

5.3

Now set Windows 7 SDK as the toolset for the project. If
this is not done then 64 bit libs won’t be found and you can get linker errors
like

6

6.1

Now run (with debug) the project by pressing F5.
The sample should run in a new window.

6.2

The default Nvidia VS2010 solution file puts the compiled
binary in a folder outside the sample’s project folder with path ../../bin/win64/$(Configuration)/
(win64 replaced by win32 for 32 bit output). The intermediate files, including
object file, are placed in the usual Debug/Release sub folders of the project.

If you want to put the output binary in the usual
Debug/Release sub folder of the project then change project Properties -> Configuration properties -> General
-> Output Directory as required.

7 Build Bug

There is a bug when using Visual C++ 2010 Express (instead
of full-fledged Visual Studio 2010). It is an inconvenience rather than a show
stopper. When the project is run (by pressing F5 or Ctrl + F5), it builds the
executable then runs it. But if you only want to build (Build/Rebuild/Clean)
the project without running it, then the build fails with error

I haven’t yet found a fix for this, but it seems that it
might be due to the different build command lines that are run when a project
is built directly and when it is built indirectly by running (F5) the project.
The command lines for various scenarios are shown below –