these lines won’t work:
(const char**)("/usr/lib/llvm-4.0/lib/clang/4.0.0/include/"),
(const char**)("stddef.h")
a character string like that is a const char *, simply casting it to const char ** is going to cause trouble. The API is designed to accept an array of strings for each parameter. You need to actually provide a proper pointer to an array of strings. Here’s an example:
https://github.com/NVIDIA/jitify/blob/master/jitify.hpp#L1625
In fact, you may just want to study and use that jitify header library.
I’d also suggest reading this:
to understand what you are really expected to provide for those parameters. Again, maybe just use jitify instead.