https://bugs.kde.org/show_bug.cgi?id=400393

            Bug ID: 400393
           Summary: When using cargo for compilation, the C++ standard lib
                    is incorrect on Windows when linking but not
                    compiling.
           Product: rust-qt-binding-generator
           Version: unspecified
          Platform: MS Windows
                OS: MS Windows
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: j...@vandenoever.info
          Reporter: jacobj...@gmail.com
  Target Milestone: ---

SUMMARY

When using cargo for compilation, such as with the "qt_quick_cargo" template,
if the C++ library is already compiled, then rust-qt-bindings-generator will
output linker information, including the standard library stdc++. When
compiling with stdc++, this fails because stdc++.lib does not exist.

The relevant code is here:
https://github.com/KDE/rust-qt-binding-generator/blob/master/src/build.rs#L241

rust-qt-bindings-generator should replicate the behavior of the cc crate, which
can be found here:
https://github.com/alexcrichton/cc-rs/blob/master/src/lib.rs#L928

STEPS TO REPRODUCE
1. Compile the qt_quick_cargo template
2. Change main.rs to trigger a recompile of the rust code but not the C++
library
3. Recompile

OBSERVED RESULT

MSVC fails to link stdc++

EXPECTED RESULT

It should not try to link to stdc++

SOFTWARE VERSIONS
commit ed2de054928db6f02a13c97afee789b1de1eebcd

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to