I'm using ecipse cdt developing c++ program. A problem is I moved all my workspace and eclipse package from turbolinux to centos linux. Then it cause a problem, that is system includes are different, but eclipse didn't refresh the include paths. And all the std container classes can not be solved.
Anyone know how to fix this problem?
Enabling Automatic File Refresh in Eclipse To set auto-refresh, go to window → preferences → general → workspace and check the "Refresh using native hooks or polling" check-box.
The CDT is Eclipse's C/C++ Development Tooling project. It is an industrial-strength C/C++ IDE that also serves as a platform for others to provide value-added tooling for C/C++ developers.
Click 'Help > About Eclipse' and then click the 'Installation Details' button at the bottom of the dialog. The resulting dialog shows all the features you have installed on the 'Installed Software' tab.
To refresh all projects in a workspace, simply enumerate all projects using ResourcesPlugin. getWorkspace(). getRoot(). getProjects() API and refresh each in turn.
I was recently bitten by this one myself (actually came to this site in search of an answer ;-) so I'll share what I found:
(these steps reflect Eclipse Indigo SR1)
First, double-check that Eclipse still reflects the old include paths:
Next, clear the old paths:
project -> properties -> C/C++ Build -> Discovery Options -> GCC C++ Compiler
click the button for "Clear discovered entries now"
Rebuild your project, such that Eclipse picks up on the new include paths
Confirm that the new include paths are set:
Checked for Eclipse Luna 4.4.0 with Cdt 8.4.0.201406111759.
You may have a look to your workspace/.metadata/.plugins/org.eclipse.cdt.core/
and check for a file named like YourProjectName.language.settings.xml
.
Delete this file (better should backup before), then reopen your project (or restart Eclipse) and Cdt should trigger the the GCC Builtin Discovery.
Note that this way may only applyable if your settings are set to project specific Builtin Discovery (not for »Use global provider shared between projects«). → see Project Properties → C/C++ General → Preprocessor Include Paths, Macros etc. → Providers → CDT GCC Built-in Compiler Settings
.
For older Eclipse versions (IMHO about until Indigo), the scanner cache files were placed in workspace/.metadata/.plugins/org.eclipse.cdt.make.core/
and named like YourProjectName.sc
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With