Compiling SDK 4.0 Examples

I have just installed the Nvidia GPU Computing Toolkit 4.0 and the GPU Computing SDK 4.0 on a Windows 7 machine. I am using VS2010. I am a user of VS 2008 and am new to VS2010. After I installed all the CUDA components, I ran the bandwidthTest executable and everything seemed to work fine. Next, as recommended by the Getting Started with Windows document, I tried to compile bandwidthTest using VS2010, but was unable. After trying several things, I’ve determined that I can compile any CUDA example that does not use .cu files (cudaEncode and deviceQuery for example), but cannot compile any CUDA examples that use .cu files. When I attempt to compile clock for example, the build fails and I get the following output:

1>------ Build started: Project: clock, Configuration: Debug x64 ------
1>Build started 5/27/2011 8:44:44 PM.
1>InitializeBuildStatus:
1> Creating “x64/Debug/clock.unsuccessfulbuild” because “AlwaysCreate” was specified.
1>AddCudaCompilePropsDeps:
1> Found “CudaToolkitCustomDir”.
1> Found “AdditionalDeps”.
1> Found “CompileOut”.
1> Found “Include”.
1> Found “Keep”.
1> Found “KeepDir”.
1> Found “NvccCompilation”.
1> Found “NvccPath”.
1> Found “RequiredIncludes”.
1> Found “TargetMachinePlatform”.
1> Found “CInterleavedPTX”.
1> Found “CodeGeneration”.
1> Found “GPUDebugInfo”.
1> Found “MaxRegCount”.
1> Found “PtxAsOptionV”.
1> Found “Defines”.
1> Found “Emulation”.
1> Found “HostDebugInfo”.
1> Found “FastMath”.
1> Found “Optimization”.
1> Found “Runtime”.
1> Found “RuntimeChecks”.
1> Found “TypeInfo”.
1> Found “Warning”.
1> Found “AdditionalOptions”.
1> Found “CommandLineTemplate”.
1>AddCudaCompilePropsDeps:
1> Found “CudaToolkitCustomDir”.
1> Found “AdditionalDeps”.
1> Found “CompileOut”.
1> Found “Include”.
1> Found “Keep”.
1> Found “KeepDir”.
1> Found “NvccCompilation”.
1> Found “NvccPath”.
1> Found “RequiredIncludes”.
1> Found “TargetMachinePlatform”.
1> Found “CInterleavedPTX”.
1> Found “CodeGeneration”.
1> Found “GPUDebugInfo”.
1> Found “MaxRegCount”.
1> Found “PtxAsOptionV”.
1> Found “Defines”.
1> Found “Emulation”.
1> Found “HostDebugInfo”.
1> Found “FastMath”.
1> Found “Optimization”.
1> Found “Runtime”.
1> Found “RuntimeChecks”.
1> Found “TypeInfo”.
1> Found “Warning”.
1> Found “AdditionalOptions”.
1> Found “CommandLineTemplate”.
1>CudaBuild:
1> Compiling CUDA source file clock.cu…
1>
1> C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\clock>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe” -gencode=arch=compute_10,code="sm_10,compute_10" -gencode=arch=compute_20,code="sm_20,compute_20" --use-local-env --cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64” -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -G0 --keep-dir “x64\Debug” -maxrregcount=0 --machine 64 --compile -D_NEXUS_DEBUG -g -Xcompiler “/EHsc /nologo /Od /Zi /MTd " -o “x64/Debug/clock.cu.obj” “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\clock\clock.cu”
1> clock.cu
1>C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\exception(407): error : namespace “std” has no member “nullptr_t”
1>
1> 1 error detected in the compilation of “C:/Users/David/AppData/Local/Temp/tmpxft_00000bb0_00000000-5_clock.compute_10.cpp1.ii”.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.0.targets(352,9): error MSB3721: The command ““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe” -gencode=arch=compute_10,code="sm_10,compute_10" -gencode=arch=compute_20,code="sm_20,compute_20" --use-local-env --cl-version 2010 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64” -I”./” -I"…/…/common/inc" -I"…/…/…/shared/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include" -G0 --keep-dir “x64\Debug” -maxrregcount=0 --machine 64 --compile -D_NEXUS_DEBUG -g -Xcompiler “/EHsc /nologo /Od /Zi /MTd " -o “x64/Debug/clock.cu.obj” “C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\src\clock\clock.cu”” exited with code 2.
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:04.29
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The “error : namespace “std” has no member “nullptr_t”” occurs with every VS2010 project that I attempt to compile with *.cu source files. There is obviously something that happens when *.cu files are included that is not being handled well. I would appreciate any help.

David