Skip to content

bindgen --version unintuitively requires an input file for no apparent reason #3094

New issue

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

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

Already on GitHub? # to your account

Closed
pmj opened this issue Jan 17, 2025 · 1 comment
Closed

Comments

@pmj
Copy link

pmj commented Jan 17, 2025

bindgen --help says:

…
  -V, --version
          Prints the version, and exits
…

But when I run it, I get:

$ bindgen --version          
error: the following required arguments were not provided:
  <HEADER>

Usage: bindgen <FLAGS> <OPTIONS> <HEADER> -- <CLANG_ARGS>...

For more information, try '--help'.

As it turns out, I really do have to specify an input file as well:

% bindgen -V mycrate/src/defs.h 
bindgen 0.71.0

This seems a really odd and confusing requirement.

@ojeda
Copy link
Contributor

ojeda commented Jan 17, 2025

Duplicate of #3039.

The file does not need to exist, so an easier workaround is to pass a dummy argument, see #3039 (comment).

@pvdrz pvdrz closed this as completed Jan 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants