Skip to content

Do not append .lib extension to .res file on cargo:rustc-link-lib=dylib=stuff.res #81488

Closed
@rodrigocfd

Description

@rodrigocfd

In Windows, when trying to pass a compiled resource script to the linker (I have MSVC build tools properly installed), I'm using the following line in my build.rs:

println!("cargo:rustc-link-lib=dylib=stuff.res");

The problem is that stuff.res is being renamed to stuff.res.lib, and since this file does not exist, the build fails. If I manually rename my file to stuff.res.lib, then it works.

Is it possible to handle this situation, maybe by identifying the provided extension and letting .res to pass?

Note: this feature request originated from here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binaries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions