The include path is not added to every source files in the project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The include path is not added to every source files in the project

904 Views
jasonedn
Contributor II

When an include path is added from the project settings, this path is not added to every source files so that the source files that need to search the header files in the folder fail to build. My project used to build properly. 
I created a new project and added an include path from the project settings, this path was really added to every source files.

Your help is appreciated! 
Jason

 

0 Kudos
5 Replies

883 Views
jasonedn
Contributor II

Hi Erich,

I was really added as shown above.

Thanks

Jason

0 Kudos

771 Views
ErichStyger
Senior Contributor V

Hi @jasonedn ,

I think you have set your options in a way not intended. I see this from your screenshot:

ErichStyger_0-1686148293061.png

 

The 'pins' mean you have set per-folder options (see https://mcuoneclipse.com/2012/07/30/icon-and-label-decorators-in-eclipse/ ) so it means you have different set of options for the folders. I suggest that you check this and potentially reset this (see as well above article).

I hope this helps,

Erich

0 Kudos

893 Views
jasonedn
Contributor II

Hi Erich,

Yes, it was really included in the project setting. I just did a test again. The "test" folder was added first from the project settings, and then check the source file test.c includes. It was not there.

image.png

 

I checked all of them and "${workspace_loc:/${ProjName}/source/test}" was not in the includes.

image (1).png

0 Kudos

775 Views
lpcxpresso_supp
NXP Employee
NXP Employee

You're adding an include path at project level and then inspect the include paths of a source file. The behavior you see is the expected one. Project-level include paths are not copied behind the scenes to all source files. However, all include paths set at project level, will be used during compilation (inspect build console and look for "-I" for confirmation).

Regards,
MCUXpresso IDE Support

0 Kudos

900 Views
ErichStyger
Senior Contributor V

Hi Jason,

did you really add it to the project settings, and not to the file (or folder) settings?

 

Erich

0 Kudos