Enable C++11 Support for CUDA Compiler (NVCC) – CUDA 6.5+

To enable support for C++11 in nvcc just add the switch -std=c++11 to nvcc.

If you are using Nsight Eclipse, right click on your project, go to Properties > Build > Settings > Tool Settings > NVCC Compiler and in the “Command line prompt” section add -std=c++11

The C++11 code should be compiled successfully with nvcc. Nsight’s C++ indexer will also work fine.

Leave a Reply

Your email address will not be published.