Closed yanshouwang closed 1 month ago
I assume you're using jpeglib.h
as your entrypoint header in your config? The easiest fix is probably to just write a new header that includes stdio.h
and jpeglib.h
, then use that as your entrypoint instead:
#include <stdio.h>
#include "path/to/jpeglib.h"
#include <stdio.h> #include "path/to/jpeglib.h"
I did this, but seems the bindings of jpeglib.h
is not generated in this way?
headers:
entry-points:
- 'src/include/jconfig.h'
- 'src/include/jerror.h'
- 'src/include/jmorecfg.h'
# - 'src/include/jpeglib.h'
- 'src/include/turbojpeg.h'
- 'src/include/hybrid_jpeg.h'
include-directives:
- 'src/include/jconfig.h'
- 'src/include/jerror.h'
- 'src/include/jmorecfg.h'
# - 'src/include/jpeglib.h'
- 'src/include/turbojpeg.h'
- 'src/include/hybrid_jpeg.h'
I could be wrong but you might want:
headers:
entry-points:
- 'src/include/stdio_and_jpeglib.h'
include-directives:
- 'path/to/jpeglib.h'
I could be wrong but you might want:
headers: entry-points: - 'src/include/stdio_and_jpeglib.h' include-directives: - 'path/to/jpeglib.h'
Tha't right, solved by only replace this header in entry-points.
Here is the error logs
I looked into the jpeglib.h, it said that the
stdio.h
is not included in this header by design. How can I solve this error when generate bindings with ffigen?