This is the point. I have a subproject (static library) created. The library compiles well. No errors. When I include this library inside a project and imports a header from tha
Regarding script to show you env variables, here's how I do it (open images at the new tab for better scaling):




As you can see, BUILT_PRODUCTS_DIR doesn't have any headers copied from the library. Either put headers there manually (strongly not recommended) or add search path to the location that you know the headers must be at:

Now as there were two headers cocos2d.h and MyStaticLibrary.h, cocos2d.h was successfully imported although it will have additional dependency.
The path ../MyStaticLibrary/build/$(BUILD_STYLE)-$(PLATFORM_NAME) will also (recursively) have public headers of the library.