Folder ( directory) hierarchy is like this:
FolderRoot/FolderX/FolderY/main.c
FolderRoot/FolderZ/header.h
How to include (write) header.h into main.c
#include "../../??????header.h" ??
Folder ( directory) hierarchy is like this:
FolderRoot/FolderX/FolderY/main.c
FolderRoot/FolderZ/header.h
How to include (write) header.h into main.c
#include "../../??????header.h" ??
If you are using GCC then you could just include the path to the headers like normal:
in main.c:
#include "header.h"
Then when compiling:
gcc main.c -I/FolderRoot/FolderZ/ -o myApp
Or this can be set in the Makefile if you are using that. Typically hardcoding even relative paths into include statements is bad juju.
thx, guys