I was wondering if it is possible to manually add non-existent header files to the bindgen builder. The C codebase I'm working with generates some header files during the compilation process, and thus don't contain them in the codebase directly. The clang process requires them though.
Let's say I have a header file which includes export.hpp like so:
#include "foo/export.hpp"
and the compiler would then add something like this during the compilation process:
//foo/export.hpp
#ifndef FOO_EXPORT
#define FOO_EXPORT
#endif
I am able to work around this by simply creating these files, but this is obviously not ideal as they could interfere with the compilation process.
The short answer is no.
The long answer is: you should actually write a build.rs file that makes sure it invokes the compilation process that produces this header file first. Usually this header file is stored / cached in the target folder.
Only after this pre-compilation step your actual cargo build process would take place.