Eclipse Juno Indexer Broken - Can't find any STL headers - c++

Ever since updating to Juno the indexer in Eclipse seems toast.
First the following is deprecated so I disabled it:
C/C++ Build -> Discovery Options -> Automate discovery of paths and symbols: Unchecked
Next, make sure this is enabled:
C/C++ General -> Preprocessor Include Paths, Macros, Etc -> Enable language settings providers for this project
Then under the Providers tab I check everything.
Do a index rebuild, build entire project.
Every single STL reference is missing. std::string, std::vector for example report as unresolved externals. Yes everything compiles fine and runs. It is just very annoying to see 10,000 errors in Eclipse. In terms of Android development Eclipse actually thinks they are real errors and prevents deployment to the device.
I am running Eclipse Juno on Ubuntu 12.04 x64.
If I go Right Click Project -> Index -> Search for unresolved includes I get a big list of files all claiming "unresolved inclusion: bits/c++config.h"
So I locate c++config.h and add the path to eclipse includes, rebuild index, no change.
I'm totally pulling hairs on this. Eclipse has never made me so frustrated!

The easiest solution? Use Indigo.
The first time I downloaded Juno, it seemed to work great. I tried to add a plugin (Java Script editor) and it died. After un/re-installing it worked but could not locate stl (>7000 problems) and was so slow it was not useable for those two reasons. Down loaded Indigo and back in business. sytem: Linux, 64, 6cpu, 8GB mem.

Related

Eclipse CDT missing C/C++ Unit

I'm tasked with hooking up Google Test in Eclipse. I got Google Test working from the command-line, but we want it working like JUnit for Java in Eclipse. This is theoretically possible. However, running through all the online instructions I can find, they all say to use Run -> Run Configurations... -> C/C++ Unit option. For the life of me, I can't find it. Everything else is in the Run Configurations dialog, just not that item.
So I figured, even though we have Eclipse for C++ Developers installed (which should contain everything that the CDT Plug-in contains), maybe it's missing the unit testing stuff. Trying to update CDT, however, just shows that the only thing missing is the Autotools stuff (which we have no need for).
Vital statistics:
Eclipse version: Oxygen.1a Release (4.7.1a)
Operating System: Linux, CentOS
Compiler: gcc
I know that's the not the latest version of Oxygen. It's the latest we can use, because the current versions have a bug that doesn't recognize our code as valid C++.
How do I get the C/C++ Unit option in Run Configurations?
You need to install "C/C++ unit testing support" feature. Go to Help -> Install new software, select All available sites and search for it. Installing it will require Eclipse restart. After restart C++ unit test group will appear in the list of Debug configurations.

Eclipse CDT missing features

We have a C++ project we want to enhance using Eclipse on Linux (CentOS 7). We have one Linux VM with Eclipse and CDT (a C++ plug-in) installed. Using CMake, we generated make files for the project and brought it up in Eclipse (File → Import → General → Existing Projects into Workspace). From there we need to do some fixes to make it compile C++ 11 code. We do this via the "Properties → C/C++ General → Preprocessor Include Paths, Macros etc." page. It all builds and works fine.
We created new Linux VMs with the same version of Linux. We installed Eclipse (Oxygen) and installed the CDT plug-in. We followed all the same steps as above, except in these new VMs, there is no "C/C++ General → Preprocessor Include Paths, Macros etc." option in the Properties dialog. We can get the code to compile as C++ 11, but the IDE itself doesn't recognize C++ 11 and marks most of the code as errors. If we had the "Preprocessor Include Paths, Macros etc." page, we could makes the necessary changes, but for the life of us, we can't figure out why it doesn't show up in the new VMs. Both Eclipse installs have the same plug-ins (one, namely, CDT).
Is there something we're missing? Is there another way to access the options that the missing page allows?
UPDATE
Perhaps some visual will help. Here is what the Properties page looks like when opened on the original Linux VM:
Here is what the Properties page looks like when opened in the new VMs:
As you can see, in the second image, there is no "Preprocessor Include Paths, Macros, etc." option underneath "C/C++ General". That is the problem. Without that page, we can't do several things to the project we need to to get it to operate correctly.
I can't really be proud of our solution to this problem. The version of Eclipse that works is Oxygen.1a Release (4.7.1a). The "latest and greatest" release of Eclipse (at the time) was Oxygen.2 Release (4.7.2). We downloaded and installed 4.7.1a and it worked. There must be a defect in 4.7.2 that prevents it from correctly recognizing C++ 11 code.
Oxygen.1a 4.7.1a imports the project perfectly and shows up all the options we need to make changes and get the application to compile and run correctly.

Using Eclipse CDT for Pintool development

So, I've got some stuff that I need to develop with pintools, and I'm having a hard time using eclipse with it all.
I found this, but it doesn't give very specific details. I was hoping that someone could provide very specific instructions as to how to use eclipse on Mac (or linux) to develop pintools.
I tried it a little, and found that on mac you have to install the clang build toolchain, and even then, doing a simple import of the MyPinTool was harder than it seemed because the makefile specifies a lot of extra options/variables that I don't know how best or correctly to configure in eclipse.
You can download pintools. The makefile that I'm talking about is in source/tools/MyPinTool, it sources a file located at tools/makefile.gnu.config
EDIT: by the way, I'm on Mac OS X Lion with an i7 using pin 2.12
c++ --version returns this:
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM
3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
I'll guess that you are using the newest version of Eclipse (4.2) and that you start working from the template MyPinTool pintool in "source/tools". I'll take those guesses because it is much easier to configure CDT to recognize the pin environment from a compiling tool, rather than manual configuring it.
First create a makefile project from existing source:
Then go to your project properties and select under "C/C++ General" -> "Preprocessor Include..." the "CDT GCC build output parser", make sure that it is enabled and if you are using clang++ as the compiler, that you add it in the compiler pattern:
Now build your pintool from within eclipse (either click on the hammer icon in the toolbar, or right click your projet and select "Build Project"). CDT should parse the build output and resolve all the paths and required macros from it. Basically, now you are good to go... But...
I have found that CDT has some quirks, if this doesn't work, try and do the following:
Check if you are working on a "deep" path (/a/b/c/d/e/f/g/h/i/j/k/l/m), sometimes CDT takes the relative build path used by the make file, and translates it to a wrong absolute path. I've found that working in a "shallower" path resolves this issue (I should open a bug report for this...).
Sometimes the indexer doesn't kick in right away. Try refreshing the project, rebuilding the index (Right click on project then "Index" -> "Rebuild"), and even restarting eclipse then doing this again.
I know it is a bit of voodoo magic, but I got it working :)
I tested this procedure on a fresh kit with MyPinTool but if it still doesn't work, please provide the steps you did and what errors does eclipse give you.

Eclipse doesn't show any C++ project selection after I install CDT

I have had a problem, I installed CDT in eclipse, the installation was successful. However, when I tried a project in C++, there is no selection for C++ Project in Menu File -> New. I have tried to find it everywhere but It doesn't show up. I also reinstalled it several times, It still didn't work.
My Eclipse is JUNO
here is the link I add to "Install new software" in help : http://download.eclipse.org/tools/cdt/releases/juno
Go to File -> New -> Other and find C/C++ projects. Unless you have the C/C++ Perspective view on I don't think C++ projects are offered at the first level under new. Once you actually, start a C++ project, Eclipse will ask if you want to switch to the CDT persepective.

How to solve non-working indexer in Eclipse CDT when using Subclipse plug-in?

I have never had any problems with the indexer when using Eclipse CDT. But now that I am starting to use the Subclipse plug-in, nothing works. I have been trying to disable the indexer and re-enable it again, no luck. Tried to remove the project from the workspace and checkout a new working copy, no luck. I simply get this on everything:
Could not find symbol 'xxxxx' in index
Perhaps worth mentioning is that the files in the project are svn:externals, not sure if that makes any different. Also, I see in Windows Explorer that there is only a .project file, shouldn't there also be a .cproject file?
I am using: Eclipse CDT 8.1.0 (Juno) and Subclipse 1.8.16
I had this exact same problem with my C++ project running Juno with Subclipse 1.8. My issue was that when I did a checkout of the repository from the SVN repository perspective, I was choosing the second option "Check out as a project in the workspace". When I chose the first option instead, "Check out as a project configured using the New Project Wizard", it checked out my entire repository and then immediately began indexing.
The reason I chose the second option first was because it seemed like it would check out my repository whereas the first option had seemed to want to create an empty project--this turned out to be a false impression, because it will indeed check out the repository.
Have you tried creating a new CDT project and then comparing the .xxx files and folders that are created? Maybe you did not store all the files you need in your repository so new checkouts are not configured properly.