Home > Software design >  Eclipse: Behavioral differences between "linked Resources" and "Build->Setting->
Eclipse: Behavioral differences between "linked Resources" and "Build->Setting->

Time:03-15

I am using Eclipse and do not understand what are the differences between "setting include paths in project setting" and "add linked resources in project setting" for a header file. How do they work?

I encountered the following scenario:

I want to use a header file "functions_api.h", which is provided in a SDK. I have set the path to the header file in "C/C Build->Settings->Includes", and the header file is also visible in my project.

  • I can include the "function_api.h" and access/use its pre-defined MACROs. However when I add e.g a new typedef to the "function_api.h", the new added typedef is not visible in my project.
  • And then I created a new file (new->file), which is linked to the "function_api.h". After this step, the new added typedef is also visible in the project.

So what I do not understand are:

  1. Why the new added typedef is not visible before linking the "function_api.h" (via new->file) while other pre-defined MACROs are visible ?
  2. What was changed after linking the "function_api.h", which make the new added typedef becoming visible?

Thanks BL_

CodePudding user response:

Comment from @user7860670 has solved the problem.

  • Related