Skip to content

Windows: Qt Debug dlls conflict with CXX-Qt #1234

Closed
@LeonMatthesKDAB

Description

@LeonMatthesKDAB

On Windows, due to Rust always linking to the non-Debug runtime, Corrosion users need to do the same with all linked in C++ dependencies.
This includes Qt!

On Windows, Qt ships debug dlls that are built in debug mode and link to the debug runtime.
This is not compatible with CXX-Qt, and we must ensure that our users always link to the right Qt binaries (e.g. the non-Debug ones, even in a Debug build).

We may be able to fix this in cxx-qt-cmake for our users, otherwise we should emit a warning/error, like we do if you have set the incorrect MSVC runtime.

Otherwise, we may run into UB, as the debug and non-debug runtimes on Windows are not ABI-compatible!

Encountered by @narnaud in yesterdays training.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⏮️ backport-candidateChange which could be backported to the stable series🔨 build systemIssues related to integrating CXX-Qt into CMake/Cargo

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions