bennetthardwick / rust-obs-plugins

A safe wrapper around the OBS API, useful for creating OBS sources, filters and effects.
GNU General Public License v2.0
186 stars 34 forks source link

Fails to build Rust OBS Wrapper #28

Closed yoshinorisano closed 2 years ago

yoshinorisano commented 2 years ago

The current master branch fails to build Rust OBS Wrapper.

$ git log | head -1
commit 08d66c684307bc804c9421ef2b0b4b963ceb4f4c

$ cargo build
(snip warnings)
   --> src\output\mod.rs:88:45
    |
88  |                       self.info.[<$f>] = Some(ffi::[<$f>]::<D>);
    |                                          ---- ^^^^^^^^^^^^^^^^ expected `u32`, found `u64`
    |                                          |
    |                                          arguments to this enum variant are incorrect
...
96  | / impl_output_builder! {
97  | |     get_name => GetNameOutput
98  | |     // this two is required
99  | |     // start => StartOutput
...   |
117 | |     get_connect_time_ms => GetConnectTimeMsOutput
118 | | }
    | |_- in this macro invocation
    |
    = note: expected fn pointer `unsafe extern "C" fn(_, u32, _)`
                  found fn item `unsafe extern "C" fn(_, u64, _) {raw_audio2::<D>}`
note: tuple variant defined here
    = note: this error originates in the macro `impl_output_builder` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `obs-wrapper` due to previous error

My build environment is here:

$ cargo -V
cargo 1.63.0 (fd9c4297c 2022-07-01)
$ rustc -V
rustc 1.63.0 (4b91a6ea7 2022-08-08)
$ rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\y\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-msvc (default)
nightly-x86_64-pc-windows-msvc

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.63.0 (4b91a6ea7 2022-08-08)