No outline for C++ source file in Nsight Eclipse

Add the mapping for C++ source file in Nsight
Add the mapping for C++ source file in Nsight

Problem

The Outline view shows the variables, functions and classes in the file currently open in the Editor in Nsight Eclipse. The Outline is filled for .cu and .h files. However, I found that it is empty for .cpp source files.

Solution

The Outline is not displayed for C++ source files because Nsight Eclipse has not mapped .cpp file to the C++ language. This filetype-to-language mapping is necessary for the Outline to the displayed.

Go to Window -> Preferences -> C/C++ -> Language mappings. You will find that only C and C++ header files have been mapped here. Add a mapping from C++ Source File to the GNU C++ language. The Outline is immediately shown for C++ source files after this is applied.

Tried with: Nsight Eclipse 6.5 and Ubuntu 14.04

Which files of Nsight Eclipse project to add to version control

Nsight Eclipse provides an IDE environment to write CUDA programs. It is built upon the Eclipse CDT platform. A CUDA project created in Nsight Eclipse includes source files created by you and additional files created by Nsight.

In addition to your CUDA source files, the following files and directories in your CUDA project need to be added to version control:

  • .project: A XML file used by Eclipse with general information about the project.
  • .cproject: A XML file used by Eclipse with information specific to CUDA compilation for the project.
  • .settings/*: Files inside this directory have more settings.

Tried with: Nsight Eclipse 5.0.0 and Ubuntu 12.04 LTS