A (very) newbie C++ question: Is there a way to automatically add the standard libraries to a C++ eclipse project? I installed the CDT Main Features plugin.
Asked
Active
Viewed 1.5k times
5
-
What do you exactly mean by standard C++ libraries? – Alok Save Jul 29 '11 at 06:47
-
Eclipse CDT does not provide a compiler, do you have one installed? – Antonio Pérez Jul 29 '11 at 06:59
-
@Snappy - They are part of the compiler, so you don't have to install them separately. – Bo Persson Jul 29 '11 at 06:59
-
I did not install a compiler. How do I install one in eclipse? – snappy Jul 29 '11 at 07:01
-
Take a look here: http://www.codeproject.com/KB/tips/CPP_Dev_eclipse_CDT.aspx – Antonio Pérez Jul 29 '11 at 07:14
-
1[This question](http://stackoverflow.com/questions/1217943) answers where the files are and how you can find the location. – Pascal Jan 25 '13 at 09:39
-
Visual Studio 2013 Preview is also a free option - if you aren't specifically trying to use Eclipse. It has its own compiler, however it's known to have some non-standard behavior. Otherwise, MinGW or Cygwin(with GCC and G++ options checked) are great if you're wanting to use Eclipse. – Ricky Mutschlechner Jul 16 '13 at 21:31
2 Answers
2
You can manually add paths to STL headers in Paths and Symbols -> Includes tab in Project Properties. This would enough for Indexer to resolve STL symbols properly.

ks1322
- 33,961
- 14
- 109
- 164
-
2And don't forget to install a compiler, which would provide the actual STL header files :) – Antonio Pérez Jul 29 '11 at 07:33
-
Where are they located by default in Linux? /usr/include did not help – lahjaton_j Jan 13 '16 at 11:03
0
If you need a compiler, make sure you have a visual studio installed, or cygwin; If you install cygwin, be sure to install the gcc and g++ compiler options which are deselected by default.
Point eclipse to the installed files and you should be good to go.

NuclearPeon
- 5,743
- 4
- 44
- 52
-
1Might be worth mentioning MinGW as well for those who don't want a giant emulation layer. – Corbin Jul 16 '13 at 21:24