Failure to parse the eclipse + CDT header file (Ubuntu 11.10, eclipse 3.7)

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.