Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94046

QtPDF: configuration with -static-runtime causes linker errors for projects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.4
    • Fix Version/s: None
    • Component/s: PDF
    • Environment:
      Win 10 MSVC 2019 x64
    • Platform/s:
      Windows

      Description

      If Qt is configured with -static -static-runtime and QtPDF is built using it, while QtPDF build itself succeeds without any problems whatsoever, building other projects fails with a long list of linker errors:

      Qt5Pdf.lib(fpdf_doc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(fpdf_view.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(fpdf_dataavail.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(fpdf_text.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(cpdf_annotcontext.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(bytestring.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(widestring.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(cpdf_page.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(cpdf_array.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(cpdf_dictionary.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
      Qt5Pdf.lib(cpdf_document.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj

      Note: The error can be reproduced by trying to build the widgets pdfviewer example

        Attachments

        1. nmake_log.zip
          1.74 MB
        2. qmake.log
          2 kB
        For Gerrit Dashboard: QTBUG-94046
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            michal Michal Klocek
            Reporter:
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change