-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add documentation about how to compile for Windows without cross-compilation #70
Comments
We have almost same in http://gtk-rs.org/docs-src/requirements.html |
.. and it also present in your link. |
I followed the steps on the tutorial to test the cross compilation from Archlinux to Windows and failed with linker problems. |
How does it fail? |
@sdroege
The output looks like https://paste.xinu.at/wCc8rp/ . To me it looks like i can compile the whole program, but linking fails. |
Needs someone who actually knows about Windows to look at that. Sounds to me like a toolchain incompatibility between the GTK binaries and the Rust toolchain. |
If you need any additional information that will help solve this or make this work please let me know. I'll also try to further investigate. I'd love to have a cross compile GTK for rust. |
I just got Hello World to work on Windows, which was great, but I felt the onboarding experience was a bit rough. It can be hard to put yourself in the shoes of a new user once you're not anymore, so I tried to write these problems down while they're still fresh in my mind:
A Windows build documentation should address those questions because other new users will likely also face them. |
No, a C compiler is sufficient.
With MSYS2 you need to install the GNU Windows Rust toolchain via rustup but you don't need to install the full GNU toolchain via MSYS2. All you need for building gtk-rs is part of the Rust toolchain, you might only need other parts for building C code. This is only a limitation/bug with MSYS2 though: if you build GTK correctly you can use a GTK built with MSVC with the Rust GNU toolchain, and a GTK built with the GNU toolchain with the Rust MSVC toolchain and any other combination you might want.
|
@Hofer-Julian Either move to gtk4-rs or close as duplicate of gtk-rs/gtk4-rs#259? |
This issue talks about gtk3, so I'd close it if the alternative is moving to gtk4-rs |
See https://www.reddit.com/r/rust/comments/86kmhu/compiling_rust_windows_gtk_stepbystep/ for a good start
The text was updated successfully, but these errors were encountered: