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

编译错误啊,各位大佬 #47

Open
miaomiao1992 opened this issue May 2, 2023 · 0 comments
Open

编译错误啊,各位大佬 #47

miaomiao1992 opened this issue May 2, 2023 · 0 comments

Comments

@miaomiao1992
Copy link

G:\Codebase\Rust\good-projects\orange\src-tauri>cargo run
Compiling serde_json v1.0.79
Compiling log v0.4.14
Compiling url v2.2.2
Compiling ntapi v0.3.7
Compiling serde_with v1.12.0
Compiling string_cache v0.8.3
Compiling tracing v0.1.32
Compiling native-tls v0.2.8
Compiling want v0.3.0
Compiling windows_macros v0.30.0
Compiling futures-channel v0.3.21
Compiling httparse v1.6.0
Compiling semver v1.0.6
Compiling proc-macro-error-attr v1.0.4
Compiling libz-sys v1.1.5
Compiling http-body v0.4.4
Compiling uuid v0.8.2
Compiling toml v0.5.8
Compiling serde_urlencoded v0.7.1
Compiling miniz_oxide v0.4.4
Compiling markup5ever v0.10.1
Compiling futures-io v0.3.21
Compiling httpdate v1.0.2
Compiling futures-sink v0.3.21
Compiling encoding_rs v0.8.30
Compiling winreg v0.10.1
Compiling sysinfo v0.23.6
Compiling windows_x86_64_msvc v0.24.0
Compiling cty v0.2.2
Compiling either v1.6.1
Compiling futures-util v0.3.21
Compiling tower-service v0.3.1
Compiling raw-window-handle v0.4.2
Compiling proc-macro-error v1.0.4
error[E0793]: reference to packed field is unaligned
--> C:\Users\Administrator.cargo\registry\src\mirrors.ustc.edu.cn-12df342d903acd47\ntapi-0.3.7\src\ntexapi.rs:2783:52
|
2783 | *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use read_unaligned/write_unaligned (loads and stores via *p must be properly aligned even when using raw pointers)

error[E0793]: reference to packed field is unaligned
--> C:\Users\Administrator.cargo\registry\src\mirrors.ustc.edu.cn-12df342d903acd47\ntapi-0.3.7\src\ntexapi.rs:2807:25
|
2807 | ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use read_unaligned/write_unaligned (loads and stores via *p must be properly aligned even when using raw pointers)

Compiling selectors v0.22.0
Compiling libgit2-sys v0.13.2+1.4.2
Compiling treediff v3.0.2
For more information about this error, try rustc --explain E0793.
Compiling serialize-to-javascript v0.1.1
error: could not compile ntapi (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

G:\Codebase\Rust\good-projects\orange\src-tauri>

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

1 participant