I have setup one Project Folder in which i have main Project Directory, say Main_Proj
. In that folder, I have created two folders for Header_Files
and Source_Files
.
Folder Header_Files
only contains all header files. lets say module_1a.h
and so on. Whereas, folder Source_Files
contains main.c
and again module wise folders, lets say Module_1
which only contains required .c
files of particular module. So for example, folder Module_1
contains Module_1a.c
and Module_1b.c
.
So the path for Module_1a.c
would be =
Main_proj\Souce_Files\Module_1\Module_1a.c
and in all source file I have included the Header Files like below -
//Code for Module_1a.c
#include "..\..\Header_Files\Module_1a.h"
....
My IDE is MP LAB and this code and all modules are working fine with MP LAB xc8 compiler.
Problem occurs when i started Lint
ing my code, its giving me error like -
Error 322: Unable to open include file '....\Header_Files\Module_1a.h'
I am using PC Lint for C and C++ (version 9). I searched for resolution of this error in Regference manual and got to know to include that directory with -i
option.
I also checked with set INCLUDE=<directory Path>
but its not working.
Is there any thing i can do with my std.lnt file or do i have to change the folder structure for my Project?
One solution is to use the flag
+fdi // #include search in the directory of the including file
see Error 322 at https://www.kessler.de/prd/gimpel/pclint-meldungen.htm
or
https://www.bezem.de/pdf/htwpl.pdf
or
https://www.gimpel.com/archive/pub90/read90.txt (Section Microsoft's nested #include search)