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

MinGW compilation issue in qtbase (qprocess_win.cpp)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.0.0
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Commits:
      cf728e60a71629096188f5d680047414dbb4956b

      Description

      Commit 320b16110f0f9cef032a64846dc792d40ccd367b tried to fix a compilation issue with qprocess_win.cpp with latest MinGW-builds toolchain. However, the fix broke compilation with stock mingw:

      io\qprocess_win.cpp: In function 'void qt_create_pipe(void**, bool)':
      io\qprocess_win.cpp:86:47: error: invalid conversion from 'unsigned int' to 'const wchar_t*' [-fperm
      issive]
      In file included from c:\mingw-32\bin\../lib/gcc/mingw32/4.7.2/include/c++/cstdio:44:0,
                       from c:\mingw-32\bin\../lib/gcc/mingw32/4.7.2/include/c++/random:39,
                       from c:\mingw-32\bin\../lib/gcc/mingw32/4.7.2/include/c++/bits/stl_algo.h:67,
                       from c:\mingw-32\bin\../lib/gcc/mingw32/4.7.2/include/c++/algorithm:63,
                       from ..\..\include\QtCore/../../src/corelib/global/qglobal.h:80,
                       from ..\..\include\QtCore/qglobal.h:1,
                       from global\qt_pch.h:58:
      c:\mingw-32\bin\../lib/gcc/mingw32/4.7.2/../../../../include/stdio.h:579:37: error:   initializing a
      rgument 2 of 'int swprintf(wchar_t*, const wchar_t*, ...)' [-fpermissive]
      jom: D:\dev\qt-5-sdk-mingw-32\qtbase\src\corelib\Makefile.Debug [.obj\debug_shared\qprocess_win.o] E
      rror 1
      

      Indeed MinGW-32 seems to only support swprintf(wchar_t*, const wchar_t*, ...) while MinGW-builds-32 seems to deprecate it in favor of swprintf(wchar_t*, size_t, const wchar_t*, ...).

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-28520
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              kkohne Kai Köhne
              Reporter:
              kkohne Kai Köhne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes