Eclipse C Development adds its own header file search path

Source: Internet
Author: User
Eclipse C Development adds its own header file search path when eclipse compiles C program prompt: ... \src\main.c:8:21:fatal error:my_type.h:no such file or directory


You need to add your own path to the header file:
Select the project and then right click, select the right menu, propertise:c/c++ Build, Settings, Tool Settings-includes click on the added symbol, the Selection Header file dialog box appears, You can select the directory where the header file or header file is located, and I select the INC directory under the current project, as shown:

In this step you can click OK, this project can find the current project directory under the header file and the current project directory under the INC directory of the header files. You can also copy the path: "${workspace_loc:/${projname}/inc}" to add to the Environment tab in the C + + Build, the C_include_path is worth the last, In this case, the new C project can also refer to the current project directory under the INC directory of the header files, it is important to note that the new project will also use Inc to do the header file directory, if not, you need to follow the above step to add again.

Eclipse C Development adds its own header file search path

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.