Home » Language IDEs » C / C++ IDE (CDT) » Question, issues about C++ Indexer behavior
Question, issues about C++ Indexer behavior [message #1451123] |
Thu, 23 October 2014 11:18 |
Jack Jones Messages: 3 Registered: October 2014 |
Junior Member |
|
|
Good day to everyone,
Before I explain my situation, I'd like to give you an idea of my developing environment:
- Windows 7, 64 bit
- Eclipse Luna SR1 + CDT 8.5
- TDM-GCC's MinGW 4.8.1
Okay... So, two days ago, I started having trouble with the C++ Indexer, in the form of the "Autocomplete" and "Organize includes"/"Add include" features pretty much not working as intended.
Allow me to explain. I can autocomplete keywords and loop structures, as well as include statements, whether from the standard libraries bundled with TDM-GCC's MinGW 4.8.1 or external libraries that I include in the project, (so Eclipse knows where to get them, and I checked that they do exist in the project's default Include Paths). However, I cannot autocomplete classes and methods that are contained within those standard/external libraries, nor I can use "Organize includes"/"Add include" to automatically populate my source code with the appropriate include statements.
I've tried rebuilding the C++ Index multiple times, deleting the metadata of the workspace, importing my projects to a whole new workspace and, even, reinstalling the whole Eclipse IDE + CDT 8.5, but nothing solved the issue. The applications I'm building compile and run flawlessly, so it's not an issue of whether Eclipse knows where to look for those headers or not.
There is one thing that baffles me about this whole situation, which is the fact that if I input an include statement manually then rebuild the C++ index, the "Autocomplete" and "Organize includes"/"Add include" features will work flawlessly. However, they will do so only for that header on any file of this project.
I don't know how the C++ Indexer works exactly, but I was under the impression that it should parse the files listed in the Include Paths, including both paths to standard libraries and external libraries. For example, assuming that I'm working with SFML 2.1, these are the Include Paths that I would assume the C++ Indexer must parse but, for some reason, doesn't:
"d:/c++ libs/sfml 2.1/include"
"d:/tdm-gcc-64/include"
"d:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/4.8.1/include"
"d:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++"
"d:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/backward"
"d:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32"
"d:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/4.8.1/include-fixed"
"d:/tdm-gcc-64/x86_64-w64-mingw32/include"
I have confirmed that those paths contain the headers of both SFML 2.1 headers and the standard library.
Is this the standard behavior of the C++ Indexer?
Edit: Clarify that both "Organize includes" (CTRL + SHIFT + O) and "Add include" (CTRL + SHIFT + N) have the same weird behavior.
[Updated on: Fri, 24 October 2014 11:42] Report message to a moderator
|
|
|
Re: Question, issues about C++ Indexer behavior [message #1451836 is a reply to message #1451123] |
Fri, 24 October 2014 11:06 |
Jack Jones Messages: 3 Registered: October 2014 |
Junior Member |
|
|
I have confirmed that this behavior is present on:
Eclipse Kepler + CDT 8.3 on Windows 7, 64 bits with TDM-GCC's MinGW 4.8.1, 64 bits
Eclipse Kepler + CDT 8.3 on Xubuntu 12.04, 64 bits with G++ 4.6.3, 64 bits
Eclipse Luna + CDT 8.5 on Xubuntu 12.04, 64 bits with G++ 4.6.3, 64 bits
All of them tested on multiple physical and virtual machines with fresh Eclipse installations.
I also found that Eclipse can autocomplete C Standard Libraries' methods and datastructures, as well as perform correctly the "Add include" task for them. However, the "Organize includes", for some reason, doesn't.
|
|
| |
Goto Forum:
Current Time: Thu Nov 07 11:05:19 GMT 2024
Powered by FUDForum. Page generated in 0.04372 seconds
|