Problems with Toolkit 3 Cannot compile sdk examples on VS2008

Apologies for posting something which probably has a simple answer but I am just starting out again after a 20 year gap in programming!

I downloaded toolkit 3 and the sdk for 64 bit win 7. The precompiled code runs fine on my GTX275 but when I try to compile the source in VS2008 (with sp1) using either debug or release versions I am getting the same error, the last part of which is:

1>ptxas fatal : Value ‘sm_20’ is not defined for option ‘gpu-name’
1>Linking…
1>LINK : fatal error LNK1181: cannot open input file ‘.\x64\Debug\simpleTemplates.cu.obj’

There is additional output which seems to include “compute_20” which I am assuming is incorrect for this card hence I am wondering whether there is a problem with the default build rule. Alas it is not clear to me how to change this.

I would be grateful for any suggestions/help. I did not have this problem with toolkit 2.3 and will revert to that if I cannot find a solution.

Apologies once more if I am completely on the wrong track (perfectly possible!).

Thanks

What’s your compilation command line for the .cu file?

Compiling with CUDA Build Rule…

1>“C:\CUDA\bin64\nvcc.exe” -m64 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” -D_DEBUG -D_WIN32 -I"C:\CUDA\include" -I"./" -I"…/…/common/inc" -I"…/…/…/shared/inc" -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MT " -maxrregcount=32 -gencode=arch=compute_10,code=“sm_10,compute_10” -gencode=arch=compute_20,code=“sm_20,compute_20” --compile -o “x64\Debug\simpleTemplates.cu.obj” “c:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\simpleTemplates\simpleTemplates.cu”

This is the ncvv command issued by VS2008, note this is a default, I have not edited anything.

The immediate response is:

1>simpleTemplates.cu

1>tmpxft_000003d8_00000000-6_simpleTemplates.compute_20.cudafe1.gpu

and then it starts to spit out warnings.

Thanks

I managed to get this to compile by deleting the sm_20 flag in the .cu build.

Curious that it does this by default.