lit-robotics / libcamera-rs

Experimental Rust bindings for libcamera
Apache License 2.0
46 stars 15 forks source link

Error when building C api wrapper: `error: unknown type name 'bool'` #18

Closed mfreeborn closed 1 year ago

mfreeborn commented 1 year ago

On a fresh install (ubuntu 22.04 on x86_64) following all the standard installation instructions for libcamera I end up with an error when rust analyzer runs build.rs : c_api/framebuffer.h:60:1: error: unknown type name 'bool'.

This appears to be fixed quite simply by adding #include <stdbool.h> in the relevant file: https://stackoverflow.com/questions/8133074/error-unknown-type-name-bool

chemicstry commented 1 year ago

I'm also using ubuntu 22.04 on x86_64 and it works 🤷‍♂️ Maybe some different transitive dependency includes it.

Thanks