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?
Solved! Go to Solution.
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:
or here:
Hope it helps.
Stan
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
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
Hey Erich! The path for both the linked and non-linked version of the file is the following:
"${ProjDirPath}/include"
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:
or here:
Hope it helps.
Stan