Check all includes and rewrite them to follow the rule: all files and libraries used in file A has to be included in file A, even if some of them are already included through other files. Also check for other problems such as unused includes. For example:
Incorrect:
//a.cpp
#include <cmath>
//using `cmath` functions
//b.cpp
#include "a.cpp"
//using `cmath` and `a.cpp` functions
Correct:
//a.cpp
#include <cmath>
//using `cmath` functions
//b.cpp
#include <cmath>
#include "a.cpp"
//using `cmath` and `a.cpp` functions
Check all includes and rewrite them to follow the rule: all files and libraries used in file A has to be included in file A, even if some of them are already included through other files. Also check for other problems such as unused includes. For example:
Incorrect:
Correct: