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

The procedure entry point "GetWindowSubclass" could not be located #282

Open
fkusche opened this issue Nov 19, 2023 · 1 comment
Open

The procedure entry point "GetWindowSubclass" could not be located #282

fkusche opened this issue Nov 19, 2023 · 1 comment

Comments

@fkusche
Copy link

fkusche commented Nov 19, 2023

I am getting a message box saying

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).

@fkusche
Copy link
Author

fkusche commented Nov 19, 2023

Looks like this is a duplicate to #251

I swear I searched the issues for GetWindowSubclass - looks like I mistyped it

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