Skip to content

Link error when using WindowsProgramming::* #967

Closed
@jquesada2016

Description

@jquesada2016

Issue

If you place the following within a bindings sub-crate (build.rs):

fn main() {
    windows::build!(
        Windows::Win32::System::WindowsProgramming::*
    );
}

and the try to use anything from the bindings crate:

use bindings::Windows::Win32::System; // For example

fn main() {}

you end up with a linking error. If you would like me to provide the error, please let me know. I didn't want to include it here because of the sheer size...

Workaround

If instead of trying to build WindowsProgramming::*, you instead try to build against a specific function, i.e. WindowsProgramming::GetComputerName, then everything works.

Extra Details

I am using windows crate on the current latest version, 0.17.2, on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions