Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

No outline for C++ source file in Nsight Eclipse

📅 2015-Mar-16 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cpp, nsight eclipse, outline ⬩ 📚 Archive

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


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧