This articleArticleFrom the Linux community website (www.linuxidc.com) Original article: http://www.linuxidc.com/Linux/2011-10/46042.htm
Eclipse CDT is powerful. After installation, C ++ can be compiled and run.ProgramBut there is a problem, that is, the header file of the C ++ standard library cannot be found and files such as files cannot be opened. The compiler warning is as follows:
Display
Unresolved regression sion:
Although compilation is not affected, the symbols in the header file cannot be located. The reason is that the C and C ++ directories of eclipse are not specified. You can specify the header file directory by setting the c_include_path and cpp_include_path environment variables in eclipse.
Add these two variables to WINDOW> preferences> C/C ++> environment:
Set c_include_path to/usr/include
Set cpp_include_path to/usr/include/C ++/4.6.1
4.6.1 is the GCC version, which can be obtained using gcc -- version. You can change it to the corresponding version.
After these two variables are added, eclipse can normally identify the header files of the C ++ standard library. Eclipse adds all the nodes files to the project.