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

Fix build on Windows arm64 #469

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Fix build on Windows arm64 #469

merged 1 commit into from
Jul 26, 2024

Conversation

wezm
Copy link
Contributor

@wezm wezm commented Jul 26, 2024

Building on a Windows Arm machine results in this error:

error[E0381]: used binding `display_ptr` isn't initialized
   --> src\native\windows.rs:279:8
    |
267 |     let display_ptr: isize;
    |         ----------- binding declared here but left uninitialized
...
279 |     if display_ptr == 0 {
    |        ^^^^^^^^^^^ `display_ptr` used here but it isn't initialized
    |
help: consider assigning a value
    |
267 |     let display_ptr: isize = 42;
    |                            ++++

Since the code seems to be using target_arch to conditionally compile based on 32/64-bit arch I changed it to use target_pointer_width instead. After this change I can run the examples:

image

@not-fl3
Copy link
Owner

not-fl3 commented Jul 26, 2024

Thanks for PR!

@not-fl3 not-fl3 merged commit 8f967a7 into not-fl3:master Jul 26, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants