visual studio 2010 - Cuda: error C2065:"threadIdx':undeclared identifier -
i trying create cuda project in visualstudio 2010. have created 1 simple test .cu file takes array , adds 1 element , sends result host.
i have added cudart.lib file linker.
in .cu code have included #include cuda_runtime.h header.
but when trying compile it, it's giving 2 errors.
error c2065 :'threadidx': undeclared identifier
error c2059: syntax error:'<'
after installing nvidia nsight visual studio edition , setting item type of .cu file cuda c/c++,it starts giving 2 additional errors:
error d8003:missing source filename
error msb3721: command ""c:\program files\nvidia gpu computing toolkit\cuda\v4.2\bin\nvcc.exe" -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:\programdata\nvidia corporation\nvidia gpu computing sdk 4.2\c\common\inc" -i"c:\programdata\nvidia corporation\nvidia gpu computing sdk 4.2\shared\inc" -i"c:\program files\nvidia gpu computing toolkit\cuda\v4.2\include" -g --keep-dir "debug" -maxrregcount=0 --machine 32 --compile -g -xcompiler "/ehsc /nologo /od /zi /mdd " -o "debug\test.cu.obj" "\ucigrad.local\users\agill\my documents\visual studio 2010\projects\cudatest\cudatest\test.cu"" exited code 2.
please me how resolve it. think there may issue nvcc compiler in vs2010 i'm not able figure out.
the errors indicate you're not compiling cuda sources nvcc. make sure are, either selecting appropriate item type (cuda c/c++) if have installed visual studio integration when installing toolkit. or make sure have set appropriate build rules sources.
Comments
Post a Comment