Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./whisper.cpp/whisper.h:121:81: error: unknown type name 'bool' #35

Closed
tazz4843 opened this issue Oct 10, 2022 · 2 comments
Closed

./whisper.cpp/whisper.h:121:81: error: unknown type name 'bool' #35

tazz4843 opened this issue Oct 10, 2022 · 2 comments
Labels
bindings Bindings for other languages question Further information is requested

Comments

@tazz4843
Copy link
Contributor

I'm attempting to automate rust-bindgen generation. This appears to not work, however, as it uses clang which does not implicitly #include <stdbool.h>. Adding #include <stdbool.h> to line 5 of whisper.h appears to fix this. I'm opening this issue to get feedback and others' thoughts.

ggerganov added a commit that referenced this issue Oct 10, 2022
"bool" type is not implicitly defined for some compilers.
@ggerganov ggerganov added question Further information is requested bindings Bindings for other languages labels Oct 10, 2022
@ggerganov
Copy link
Owner

I've added the header as suggested.

I am no sure if it is a good practice to use bool in C-style interfaces, but I really prefer it in terms of code readability.
In case it turns out that it causes some sort of incompatibilities, we will switch it to int.

@tazz4843
Copy link
Contributor Author

This issue appears to have been the last major blocker to Rust bindings. I have published the ergonomic Rust wrapper at https://crates.io/crates/whisper-rs, if you're curious. Thanks for making this lib!

anandijain pushed a commit to anandijain/whisper.cpp that referenced this issue Apr 28, 2023
"bool" type is not implicitly defined for some compilers.
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this issue Oct 24, 2023
"bool" type is not implicitly defined for some compilers.
kultivator-consulting pushed a commit to KultivatorConsulting/whisper.cpp that referenced this issue Feb 12, 2024
Add coreml feature flag and build.rs updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings Bindings for other languages question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants