CUDA and C++ integration


My project contains pure C++ code, i.e inheritance, virtual, run time polymorphism, memory dereferences etc. Also i am using OpenGL for image rendering. To increase my execution performance i am planning to use CUDA. In CUDA website mentioned that CUDA is preferable for only C like.
I want to work with CUDA in my c++ project. Please give me a suggestion to how to integrate CUDA with C++.

Thank you


I’m also looking for such information. Now I’m learning and trying to compile cppIntegration example from SDK (C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\cppIntegration)

I can’t launch this project not from default directory. I constantly get following error:

1>nvcc fatal   : A single input file is required for a non-link phase when an outputfile is specified


1>LINK : fatal error LNK1181: cannot open input file '.\debug\'

nvcc simply doesn’t create ‘.\debug\’. Why?

We’ve found my stupid mistake.

I have the following paths written in Microsoft Word:

I copied them to properties of Linker and Compiler. After that errors appead.
We looked the .vcproj file, and in place of " was &quot.
We deleted &quot and my error disappeared