Eclipse CDT not generating symbols for new projects
All new projects I create in eclipse lack any automatic includes (such as the standard library) or any of the default Paths and Symbols that are usually generated automatically. The only way I can get my new projects to work is to manually copy the paths and symbols, as well as the includes, to the other project. This is very tedious and isn't practical. Is there any way to restore those Paths and Symbols, as well as the includes, as the default?
Edit: This is the export file that gets created (with not data):
<?xml version="1.0" encoding="UTF-8"?> <cdtprojectproperties> <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths"> <language name="Object File"> </language> <language name="Assembly Source File"> </language> <language name="C++ Source File"> </language> <language name="C Source File"> </language> </section> <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros"> <language name="Object File"> </language> <language name="Assembly Source File"> </language> <language name="C++ Source File"> </language> <language name="C Source File"> </language> </section> </cdtprojectproperties>
Here's an alternative to the Export/Import Settings buttons that I stumbled upon while looking into the export problem you're having. It's actually a process that I think I'll be using from now on, so if nothing else I learned something from answering your question. There may be a cleaner or quicker way of doing the same thing, but this at least works.
- Open Eclipse preferences and navigate to C/C++→Property Pages Settings. Check Display "Export Settings" tab.
- Create a new C++ Project that will represent your settings. Empty Project with your preferred toolchain works, but I doubt it matters what you choose.
- Open this settings project's properties and navigate to C/C++ General→Export Settings.
- Add your common include folders & files, symbols, libraries and library paths here.
- Open your normal C++ project's properties and navigate to Paths and Symbols→References. Check the box next to the name of your new settings project.
- The export settings assigned in your settings project now appear in your normal project.
Now whenever you need those settings again, just import that settings project into your workspace and have the other projects reference it.
Let me know if this works for you. I'm still fiddling with it (there are quite a few new options available that open up with this approach), so any feedback would be great.
Edit: This answer describes an alternative way to share settings between projects. It may work better for you if you don't like the "project as settings" thing I describe here.