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

Compilation error on Windows in qcollator_p.h when ICU is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.4.0
    • Some future release
    • Core: Locales (i18n)
    • None
    • MSVC 2013, ICU enabled, building from trunk of 5.4 branch

    Description

      Summary

      I cloned the Qt repo and switched to the 5.4 branch, then initialized the submodules. After that, I configured and began building Qt, in particular with ICU enabled. I received a build error in qcollator_p.h due this line: https://qt.gitorious.org/qt/qtbase/source/75ae4dacbc79fd70bf9f2fc7ed2b59ff2e00a0f6:src/corelib/tools/qcollator_p.h#L87 which was added on Aug. 27th by Lars as a part of WinRT support.

      When ICU is enabled however, none of the Q_OS_WIN branch should be built. So I modified line 83 to be `#if !defined(QT_USE_ICU) && defined(Q_OS_WIN)` (https://qt.gitorious.org/qt/qtbase/source/75ae4dacbc79fd70bf9f2fc7ed2b59ff2e00a0f6:src/corelib/tools/qcollator_p.h#L83) and all is well.

      configure line

      %HOME%\Code\qt5\configure -prefix C:\Qt\5.4-upstream\msvc2013 -opensource -nomake examples -nomake tests -skip qtwebkit -skip qtwebkit-examples -system-proxies -qt-zlib -qt-pcre -icu -qt-libpng -qt-libjpeg

      Approximate error

      I've already fixed it, it happens early in qtbase build:

      missing ';' before identifier 'localeID' in qcollator_p.h:87

      Cause of error

      (qt_)windows.h is not ultimately included since in the header include section, the QT_USE_ICU path is taken and we don't fall back to the Q_OS_WIN path. Therefore, LCID is never defined.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            jarrednicholls Jarred Nicholls
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes