Is it just to test compile a simple program, with that header file #included in it?
To better understand the compilation process I'm writing my own "configure", which tests for the existence of a few header and library files.
Yes, use the compiler to compile your simple test program. That's the best and easiest way to see if the compiler can find the header. If you hard code #include search paths you'll always have to modify and adapt for different compilers.
The GNU Autoconf suite checks for headers by running test compilations. Just testing for the existence of a file 'filename.h' is fairly simple:
#include <filename.h>
int main(void){return 0;}
You might prefer quotes instead of angle brackets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With