Ubuntu eclipse CDT cannot find the file containing the header

Source: Internet
Author: User

The most recent project porting really hurts. For example, I add a C ++ standard header file in a. h file:

# Include <vector> # include <map>

The compilation result is that the header file cannot be found. When the path of the standard library is opened, the file is clearly there, so you can add the include path in the project settings, and the result is still useless.

Later I checked it for a long time to know that when the GCC compilation of the C and C ++ mixed projects of CDT, the default is to compile the C standard first, so I found that there was a problem with the compilation option settings, and finally added-X to the compilation options to solve the problem. At the same time, the compiler also solved the keyword class error:

However, it was later found that the-x parameter was faulty, which could lead to unrecognized parameters such as-MMD during compilation and failed compilation, in my Eclipse project settings, the standard C ++ and C header file include paths are not added, so there is no problem after adding them.

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.