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

unresolved imports winapi::shared::winerror, winapi::um::handleapi, winapi::um::winbase #46

Closed
Dmajster opened this issue May 24, 2020 · 4 comments

Comments

@Dmajster
Copy link

when trying to compile shared_memory 0.11.1 on Windows 10 I get this error.

error[E0432]: unresolved imports `winapi::shared::winerror`, `winapi::um::handleapi`, `winapi::um::winbase`
  --> C:\Users\domen\.cargo\registry\src\github.com-1ecc6299db9ec823\shared_memory-0.11.1\src\windows.rs:4:9
   |
4  |         winerror::ERROR_ALREADY_EXISTS,
   |         ^^^^^^^^ could not find `winerror` in `shared`
...
8  |         handleapi::{CloseHandle, INVALID_HANDLE_VALUE},
   |         ^^^^^^^^^ could not find `handleapi` in `um`
9  |         memoryapi::{MapViewOfFile, UnmapViewOfFile, VirtualQuery, FILE_MAP_READ, FILE_MAP_WRITE},
10 |         winbase::{CreateFileMappingA, OpenFileMappingA},
   |         ^^^^^^^ could not find `winbase` in `um`

Other information:
windows 10 (build 17763)
rustup 1.21.1 (7832b2ebe 2019-12-20)
cargo 1.45.0-nightly (cb06cb269 2020-05-08)
rustc 1.45.0-nightly (a74d1862d 2020-05-14)

@elast0ny
Copy link
Owner

Hi, this most likely looks like some error with the winapi version... do you know what that version is ?

@Dmajster
Copy link
Author

I'm not aware of the version as I have not ever directly worked with winapi before

@elast0ny
Copy link
Owner

elast0ny commented May 26, 2020

Could you share a minimal example that causes the issue ?

I cant reproduce this locally and it wasn't caught by the automatic builds either...

p.s. : I updated the Cargo.toml winapi dependency to add all the features I'm using in shared_memory. Please try to build from master and let me know if that fixed the issue.

[dependencies]
shared_memory = { git = "https://github.com/elast0ny/shared_memory-rs" }

@Dmajster
Copy link
Author

Dmajster commented May 26, 2020

sure, but it is literally an empty project with shared_memory as it's only dependency and the mutex example code.

https://github.com/Dmajster/shared_memory_issue

[edit] adding the dependency then threw errors about raw_sync missing and worked normally when I added raw_sync to cargo.toml. I tried then doing the same at my old project and it didn't work. It appears to be some other issue on my end.

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants