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

MinGW compilation issue in qtbase (qprocess_win.cpp)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • None
    • 5.0.0
    • Core: Other
    • None
    • cf728e60a71629096188f5d680047414dbb4956b

      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*, ...).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes