Code analysis issues (unresolved symbols) [message #1435588] |
Wed, 01 October 2014 18:20 |
Josh Kelley Messages: 5 Registered: July 2009 |
Junior Member |
|
|
I'm getting quite a few code analysis errors regarding "Symbol ... could not be resolved" and "Function ... could not be resolved" in my project.
How do I go about identifying and fixing code analysis / parser errors like this?
Specific problems:
- Many Boost classes work, but several seem to commonly cause problems: boost::optional (always fails), boost::scoped_ptr and boost::scoped_array (sometimes fails?), boost::bind, boost::function, boost::regex (and boost::smatch, etc.; sometimes fails?).
- Even though Eclipse says a symbol is unresolved, for many symbols, clicking on it then pressing F3 (Open Declaration) works.
- If I press Ctrl+Shift+T (Open Element) and type the name of one of the unresolved symbols that Eclipse is complaining about (e.g., "MyFunc"), I commonly get two entries under "qualified name and location:" "MyFunc" and "boost::boost::boost::boost::boost::boost::boost::boost::boost::boost::boost::MyFunc".
In many cases, I'm able to resolve an error (at least for #2 + #3) by doing the following:
- Open the header file where the symbol is declared.
- Delete the declaration from that header file.
- Right-click on the project containing the file with the unresolved symbol and choose Index -> Update with Modified Files. (It's my understanding that this step is necessary because the header is in a different project.)
- Undo the deletion.
- Right-click and choose Index -> Update with Modified Files again.
It's very tedious to do this for all errors, and if I rebuild indexes, all of the problems come back.
More details:
- Code base is for Windows Embarcadero C++Builder, organized into several C++ libraries and several executables that depend on those libraries.
- Each library and each executable is a separate Eclipse project.
- I'm using Boost 1.39 (since that's all that's directly supported for 32-bit Windows apps in Embarcadero C++Builder).
- Observed in Luna CDT 8.4.0 and 8.5.0. I think I saw them in Kepler also, but I don't remember.
Any ideas on how to fix this? How do I go about troubleshooting a problem like this?
|
|
|
Powered by
FUDForum. Page generated in 0.03732 seconds