The procedure entry point "GetWindowSubclass" could not be located in the dynamic link library MY_RUST_PROGRAM.EXE
This seems to happen, when another create pulls the crate windows-targets in. Which is something, that for example current versions of chrono do.
Here is a sample program to reproduce:
use chrono;
fn main() {
nwg::init().expect("Failed to init Native Windows GUI");
let mut _name_edit: nwg::TextInput = Default::default();
println!("Hello, world!")
}
And the corresponding Cargo.toml:
[package]
name = "rust-nwg-error"
version = "0.1.0"
edition = "2021"
[dependencies]
chrono = "=0.4.27"
nwg = {version = "^1.0.13", package = "native-windows-gui", default-features = false, features = ["no-styling"]}
When I run this, I immediately get the message box.
However if I either lower the chrono version to "0.4.26" or if I just remove the use chrono; in the program, the hello world message is printed.
chrono versions 0.4.27 and newer depend on windows-targets. That's why I suspect it has something to do with that crate (and not chrono itself).
I am getting a message box saying
This seems to happen, when another create pulls the crate
windows-targets
in. Which is something, that for example current versions ofchrono
do.Here is a sample program to reproduce:
And the corresponding
Cargo.toml
:When I run this, I immediately get the message box.
However if I either lower the chrono version to "0.4.26" or if I just remove the
use chrono;
in the program, the hello world message is printed.chrono
versions 0.4.27 and newer depend onwindows-targets
. That's why I suspect it has something to do with that crate (and notchrono
itself).