compilation "exited with code 2"

Hello

I am compiling a programm using a Cuda kernel. (GPU capability 2.0, Cuda 4.0, Nsight 2.0, Visual 2010, Win7)

But I am getting the error “exited with code 2” without any other explanation.

It appears that the compilation error does not occur, if I comment a line in the kernel code that calls a class constructor (such like: “my_class A(m,n,pointer,k);” )

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2008 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" 

-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include" 

-G0 -maxrregcount=32 --machine 32 --compile -I. -D_NEXUS_DEBUG -g	-Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o "Win32\Debug\source.cu.obj" "C:\.....source.cu" 

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 3.2.targets(290,9): error MSB3721: 

The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2008 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" 

-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include"

 -G0 -maxrregcount=32 --machine 32 --compile -I. -D_NEXUS_DEBUG -g	-Xcompiler "/EHsc /nologo /Od /Zi /MDd " -o "Win32\Debug\source.cu.obj" "C:\......source.cu""

exited with code 2.

Any suggestion? Thanks in advance

Thanks for your suggestions… it was very helpful…
(BTW, I finally found a way to solve the problem.)

please tell me how you solved this problem?