If a C file contains this statement:
#include <stdbool.h>
(which is present in the standard C/C++ directories)
It is not found by SWIG:
swig -includeall -outdir . -python ./DV.i
asn1crt.h:5: Error: Unable to find 'stdbool.h'
The workaround I found was to use the -ignoremissing flag, but there might be an issue in the parser with the include directories.
As the manual says about
-includeall
:I'm sure you don't actually want SWIG to try to wrap everything in
<stdbool.h>
, but to get it to do this unwanted thing you would need to tell SWIG where to find it with-I
- it's a compiler-specific header and so stored in a compiler-specific directory, and SWIG has no way of knowing what compiler you're using.E.g. I have the following
stdbool.h
headers on this machine for various different compilers and for C vs C++:-includeall
is rarely useful unfortunately. It's handy to be able to follow includes between headers for the library being wrapped, but if any of those headers include a system header then-includeall
doesn't know to stop including all and is unlikely to give a useful result.