below is the (sample) code structure
/src
/poreA
- a1.h
- a1.cpp
/poreB
- b1.h
- b1.cpp
/poreC
- c1.h
- c1.cpp
- c2.h
/maincpp
-communicate.h
-communicate.cpp
-network.h
-network.cpp
-mainfile.cpp
-mainfile.h
Each folders (poreA,poreB,poreC) has its own make files
c1.h
#include "a1.h"
// struct definitions are defined here
communicate.h
#include "../poreC/include/c1.h"
#ifndef POREC_H_
#define POREC_H_
network.h
#include "communicate.h"
mainfile.h
#include "network.h"
mainfile.cpp
#include "mainfile.h"
#include "network.h"
When I try to compile,
$ gcc -c mainfile.cpp
I get error as
../../poreC/include/c1.h: fatal error: a1.h, no such file or directory
#include "a1.h"
I tried to understand the concept from similar posts but not able to solve this issue