My project structure and files are as follows:
project\HAL\hw_lcd.h
project\HAL\hw_lcd.c
project\project\app.c
project\project\workspace.mcp
project\project\workspace.mcw
Where 'project' is a place holder for project name. I'm using MPLAB IDE 8.66 and HI-TECH Compiler 9.81.
I'd like to add hw_lcd.h/c files using relative path to the project. So that if I write #include "HAL/hw_lcd.h"
in app.c, then hw_lcd.h will be found from app.c.
I added ../
as include search path (project > build options... > project > directories and search path > include search path) but got following error:
can't open include file "hw_lcd.h": No such file or directory
Then I tried ../HAL
as include search path and written #include "hw_lcd.h"
in app.c. This also generates the above error.
Is it possible to use relative search path from within MPLAB IDE?
If the #include
path itself is relative, then it works:
#include "../HAL/hw_lcd.h"