Netbeans: Navigate-> Go To Declaration/Definition BROKEN with "Cannot Open Element" on C++ 64-bit Ubuntu

StackOverflow https://stackoverflow.com/questions/23380972

Question

My Netbeans right-click Navigate -> Go to Declaration/Definition is broken, it refuses to go anywhere. Instead, in the lower left-hand corner, a message pops up: 'Cannot open element: "myvariablename".' It does not matter if the variable or function I have selected to inspect is remote, global, or local to the function. Neither does it work from the upper menu Navigate -> Go to Declaration/Definition.

Netbeans is using the GNU C++ toolchain on a 64-bit Ubuntu 13.10 AMD. It uses make, compiles, and runs the complex C++ projects correctly.

I upgraded and installed a new version of Netbeans 8.0 to get rid of this, but it still happens.

There are some few cases in which it works correctly, but I have not been able to tell the difference yet. When the code does not compile and link all the way, it seems to be worse. It may be project-dependent. I could understand getting lost if the project does not compile and link, but it certainly has enough information to know where everything is.

I do not have any such problems with my other 32-bit Ubuntu machine running Netbeans 8.0. I guess it is some kind of configuration issue.

How do I get Netbeans to be able to successfully go to the source definitions of variables and functions under C++ projects? Thank you.

Was it helpful?

Solution

"Please try to close NetBeans, delete cache dir /home/user/.cache/netbeans/8.0rc1 and start NetBeans again."

This worked for me this time.

OTHER TIPS

On the "Projects" tab, right click in one of the top projects folder and select:
Code assistance / reparse project

btw, I am using netbeans 11 with C++ plugin (this plugin is from nb8 as I remember but works very well).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top