Cannot find generated.h file in other module

I have two modules set up. Module “A” calls a class that exists in module “B”. In that class’s header file it calls another header file. Inside this header file it fails to find the generated.h file even though both directories for the modules exist in the NMAKE include search path.

Any suggestions on how to get the UE4 build tool to recognise the existence of the generated.h file?

Answer provided here:

Add your module to the PublicDependencyModuleNames part of the Build.cs file of module “A”.