How Can I Include Header Files by Compilation Flags?

70 views Asked by At

I have switched to GCC 11. One change in version 11 is that some C++ Standard Library headers have been changed to no longer include other headers that they do need to depend on. (Called "Header dependency changes" here: https://gcc.gnu.org/gcc-11/porting_to.html).

Now when I want to compile a big 3rd party library that has compiled fine with GCC 10, I get compilation errors because of missing header file inclusion. As a quick workaround I would like to automatically include the four header files mentioned in the porting notes <limits>, <memory>, <utility>, <thread> when compiling that library, but I don't want to patch its source code.

Is that possible? Is it possible by passing some compilation flags, since this is easy to modify in the build process? Or is there another simple workaround for missing include files?

0

There are 0 answers