VS2010 & CUDA 4.0 new/delete I tried changing the compilation flags, but it didn't work.

I have Visual Studio 2010 and CUDA 4.0. I’m trying to use new / delete from kernel code (device). I’ve found where I should have -arch sm_20 and so I edited the VS2010 compilation Code C/C++/Device/Code Generation to be compute_10,sm_20. But when I go to compile, it looks like it applies these flags once, but then it also shows the old flags again as compute_10,sm_10.

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe" -gencode=arch=compute_10,code="sm_20,compute_10\ " -gencode=arch=compute_10,code=“sm_10,compute_10\ " --use-local-env --cl-version 2010 -ccbin “c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include” -G0 --keep-dir “Debug” -maxrregcount=0 --machine 32 --compile -D_NEXUS_DEBUG -g -Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o “Debug\CUDA_CABAC_Module.cu.obj” “C:\Users\Mike\2010\tec1\CUDA_CABAC_Module. cu”

Does anybody have any idea what I have to change to get a good command line. The newdelete demo in the SDK 4.0 runs fine.

Thanks in advance,
Mike

did you find any solution?

I have the similar problem. The example code of NewDelete runs well but there are errors reported on the lines where “new” and “delete” are used.