Linked files not found by compiler?

cancel
Showing results for 
Search instead for 
Did you mean: 

Linked files not found by compiler?

Jump to solution
2,569 Views
gearhead1107
Contributor IV

When I use this guide to create linked files in S32DS, I use Ctrl+click/drag to take one file "CAN_TxRx.h" and move it into another project, linked relative to "PROJECT_LOC", however it seems the compiler cannot "see" the linked file

In the build for this project, I get the following error:

../Sources/CAN_TxRx.c:8:22: fatal error: CAN_TxRx.h: No such file or directory

..even though the file appears in the "include" folder as a linked file.

I've searched around, and most of the issues relate to folks not adding another project's path to the compiler's include path - which doesn't sound relevant to this issue, since the project builds with no errors when "CAN_TxRx.h" is copied in the file system.

Is there a build setting I should look for that excludes linked files?

0 Kudos
1 Solution
1,210 Views
stanish
NXP Employee
NXP Employee

Andrew, 

Can you post here the "CAN_TxRx.args" file. This file should be located somewhere in your output directory e.g. "Debug\Sources". It contains all the include paths. 

Drag&Drop a header file as a linked file into your project does not add the include path into your project properties. You have to do it manually e.g. here:

pastedImage_3.png

or here:

pastedImage_4.png

Hope it helps.

Stan

View solution in original post

0 Kudos
4 Replies
1,210 Views
gearhead1107
Contributor IV

It's a bummer that you have to manually go back and include the path when the "feature" should supposedly make it seamless.

Ironically it seems that both must be done - c files must be virtually added to the build path, and includes must be specified under paths and symbols

0 Kudos
1,210 Views
BlackNight
NXP Employee
NXP Employee

Is this error generated by the compiler? What happens is that the 'make' (or managed make) driver callse the compiler with the source (*.c) file and passes the option -I to the compiler with the search path list where to find the header file. It seems to me that the compiler cannot find that header file. Can you double check that the -I option has the path to that CAN_TxRx.h file present? For testing you might specify he absolute path to that directory too in the compiler settings.

I hope this helps,

Erich

0 Kudos
1,210 Views
gearhead1107
Contributor IV

Hey Erich! The path for both the linked and non-linked version of the file is the following:

"${ProjDirPath}/include"

0 Kudos
1,211 Views
stanish
NXP Employee
NXP Employee

Andrew, 

Can you post here the "CAN_TxRx.args" file. This file should be located somewhere in your output directory e.g. "Debug\Sources". It contains all the include paths. 

Drag&Drop a header file as a linked file into your project does not add the include path into your project properties. You have to do it manually e.g. here:

pastedImage_3.png

or here:

pastedImage_4.png

Hope it helps.

Stan

View solution in original post

0 Kudos