Can't Create Cuda Project With Visual Studio 2013

yesterday, I watched the video and created C++ project and did the configurations as mentioned in this video (build customization…)

I had the following errors :

  • cuda file type (CUDA C++) does not recognized
  • cuda keywords and variables do not recognized and result in compilation errors

If I re-install CUDA Toolkit, should I re-install NSight also ?
The version of NSight I installed is the latest and is different from CUDA 6.0 toolkit one.

I did un-install and re-install of CUDA Toolkit 6.0.
The only integration I have is in VS2010, and there no any integration into VS2012 and VS2013!

In VS2010 there is no CUDA C+ file types in Propriety Window.

intellisence does not recognize <<<

how to make integration into VS2012/2013 ?

I have stated previously that you will have NO integration with VS2013, as that is not supported.
In regards to VS2012, my only thoughts is that the installer might need work detecting other compilers. In the meantime, if you don’t need VS2010, just uninstall it. Also make sure that VS2012 has the latest updates (Update 4 at the moment), that might be why the installer is not recognizing it. You might want to file a bug report against the installer under the registered developer site if you find this is an issue reproducible across systems.

I have stated multiple times that you can accomplish the integration manually in the meantime… go forward with that path… with the video and instructions without any templates.

I tried many times, and compared compilation/linker options line by line, there is the following error

  • error C2059: syntax error : ‘<’

The steps I did :

  • Create Win32 C++ project
  • Add Build Customizations → CUDA 6.0 Toolkit
  • Rename .cpp to .cu
  • Add simple code
  • Try to compile (F6)

What is wrong ?

I found a very good article on this subject
http://www.thomas-zhu.com/cuda-6-rc-vs2013-creating-cuda-project/

the only thing to correct is IntelliSence in VS taking in consideration CUDA
for example, for <<< syntax I have “IntelliSense: expected an expression”

Yes, that’s what I had suggested to the original poster – to use the VS2012 toolchain from within VS2013. As far as intellisense and the kernel chevron <<< >>> use, I believe that’s been like that for a while and they have not bothered to correct it.

In regards to the error you experienced earlier, it’s basically fixed by telling VS to set the type of .cu files to CUDA C/C++ (right-click on the file, Properties, set Item Type):

See:
http://stackoverflow.com/questions/6342220/problem-when-calling-template-cuda-kernel

Thank you so much for your help!

I’ve read that it is possible to use ICC v13.2 on Linux

perhaps, do you know how could I use Intel toolchain v14.2 on Windows ?
or, the only way to compile c/c++ code separatly in a library (dll,lib), is not it ?

I used the Intel compiler suite on Windows with Visual Studio last year and it works flawlessly with CUDA. I’m not sure what you’re working on but if it’s just for fun I generally recommend Linux, all you need is free. I’m very happy with GCC 4.8 and CUDA 6.0.