Note that IIUC, for non-system includes to work, either - the filenames must be absolute, or - the compiler must be given -I arguments through org-babel-C-compiler. This variable can be set (e.g. to "gcc -I .") with file or directory-local variables. Should we promote this method in NEWS? A downside is that the user will be warned about the variable's value being potentially unsafe, and we can't really avoid that unless we throw a blanket :safe #'stringp on this defcustom.
Yeah, when I used it, I just used an absolute path. It's not entirely intuitive.
Would it be reasonable to automatically add the value of (file-name-directory buffer-file-name) to GCC's search path when (1) non-system imports are used and (2) buffer-file-name is non-nil? If we do, then any header in the same directory as the *.org file should "just work".
Seems like it would be safe, and I'm happy to try putting that together if there's interest.