vst_window icon indicating copy to clipboard operation
vst_window copied to clipboard

unresolved imports `winapi::shared::windef`, `winapi::um::winuser`

Open alfvy opened this issue 3 years ago • 2 comments

trying to build VST UI for the first time, it gave me these errors:

   Compiling vst_window v0.3.0
error[E0432]: unresolved imports `winapi::shared::windef`, `winapi::um::winuser`
 --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:6:25
  |
6 |     shared::{minwindef, windef},
  |                         ^^^^^^ no `windef` in `shared`
7 |     um::winuser,
  |     ^^^^^^^^^^^ no `winuser` in `um`

error[E0432]: unresolved imports `winapi::shared::windef`, `winapi::um::winuser`
 --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\window.rs:7:25
  |
7 |     shared::{minwindef, windef},
  |                         ^^^^^^ no `windef` in `shared`
8 |     um::{libloaderapi, winuser},
  |                        ^^^^^^^ no `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
  --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:91:25
   |
91 |             winapi::um::winuser::SetCapture(hwnd);
   |                         ^^^^^^^ could not find `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
  --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:98:25
   |
98 |             winapi::um::winuser::ReleaseCapture();
   |                         ^^^^^^^ could not find `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
   --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:105:25
    |
105 |             winapi::um::winuser::SetCapture(hwnd);
    |                         ^^^^^^^ could not find `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
   --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:112:25
    |
112 |             winapi::um::winuser::ReleaseCapture();
    |                         ^^^^^^^ could not find `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
   --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:119:25
    |
119 |             winapi::um::winuser::SetCapture(hwnd);
    |                         ^^^^^^^ could not find `winuser` in `um`

error[E0433]: failed to resolve: could not find `winuser` in `um`
   --> C:\Users\alfy\.cargo\registry\src\github.com-1ecc6299db9ec823\vst_window-0.3.0\src\platform\windows\event_source.rs:126:25
    |
126 |             winapi::um::winuser::ReleaseCapture();
    |                         ^^^^^^^ could not find `winuser` in `um`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `vst_window` due to 8 previous errors

alfvy avatar May 27 '22 15:05 alfvy

@alfvy evidently, I've never tried building vst_window standalone on Windows; I've only ever tried building it as a dependency of a VST project.

Those should be enabled by the windef and winuser features on the winapi crate. Would you mind adding those to Cargo.toml and testing it out? If it works I'd be happy to accept a PR.

antonok-edm avatar May 30 '22 05:05 antonok-edm

sorry for the long wait, I am in the middle of finals, the build failed and gave me the same errors, I did try building with Schwi's fork and it compiled flawlessly

also worth of note the plugin it self must implement the Send trait for it to be "thread safe"

alfvy avatar Jun 02 '22 13:06 alfvy