Skip to content

Windows: Static libraries should end with .lib not .a when using the MSVC ABI install #29508

Description

@pjmlp

The standard extension for Windows static libraries is .lib.

By keeping the .a extension while using the MSVC ABI, we are forced to rename the files when integrating Rust libraries into compiler chains that expect .lib as an extension.

Reopening the bug here as suggested by alexcrichton (rust-lang/cargo#2100)

Activity

  1. nagisa commented on Nov 1, 2015

    @nagisa
    Member

    Duplicateish of #28025. Maybe reopen that instead, since it has more discussion?

  2. retep998 commented on Nov 1, 2015

    @retep998
    Contributor

    rustc foo.rs --crate-type=staticlib produces libfoo.a.
    This needs to be changed to produce foo.lib for -msvc.

  3. retep998 commented on Nov 1, 2015

    @retep998
    Contributor

    Actually, since that would conflict with the import library produced by --crate-type=dylib I propose using libfoo.lib instead for staticlib as it matches the conventions that Microsoft uses to distinguish static/dynamic libraries (such as ucrt.lib vs libucrt.lib)

  4. added a commit that references this issue on Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions