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

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

Open
LeonMatthesKDAB opened this issue Mar 20, 2025 · 0 comments
Open

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

LeonMatthesKDAB opened this issue Mar 20, 2025 · 0 comments
Labels
⏮️ backport-candidate Change which could be backported to the stable series 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo

Comments

@LeonMatthesKDAB
Copy link
Collaborator

LeonMatthesKDAB commented Mar 20, 2025

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.

@LeonMatthesKDAB LeonMatthesKDAB added ⏮️ backport-candidate Change which could be backported to the stable series 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo labels Mar 20, 2025
@LeonMatthesKDAB LeonMatthesKDAB moved this to ToDo - 0.8 in Cxx-Qt 1.0 Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⏮️ backport-candidate Change which could be backported to the stable series 🔨 build system Issues related to integrating CXX-Qt into CMake/Cargo
Projects
Status: ToDo - 0.8
Development

No branches or pull requests

1 participant