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

iOS compiling error: qchar.h:45:1: error: unknown type name 'QT_BEGIN_NAMESPACE'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • None
    • 5.7.0
    • QPA
    • None
    • QT 5.7
      XCode 7.3.1 (with 7.0.1 occurs the same, other versions not tested)
      OSX El Capitan 10.11.6
    • iOS/tvOS/watchOS

      An application compiled for Windows and Android without warnings and errors (on windows environment). When compile for iOS appears these errors:

      In file included from ../../Qt/5.7/ios/include/QtCore/qstring.h:48:
      ../../Qt/5.7/ios/include/QtCore/qchar.h:45:1: error: unknown type name 'QT_BEGIN_NAMESPACE'
      QT_BEGIN_NAMESPACE
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:48:1: error: expected unqualified-id
      class QString;
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:55:29: error: unknown type name 'ushort'; did you mean 'short'?
      Q_DECL_CONSTEXPR inline ushort unicode() const Q_DECL_NOTHROW

      { return ushort(uchar(ch)); }
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:55:83: error: use of undeclared identifier 'uchar'; did you mean 'char'?
      Q_DECL_CONSTEXPR inline ushort unicode() const Q_DECL_NOTHROW { return ushort(uchar(ch)); }

      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:55:36: error: no return statement in constexpr function
      Q_DECL_CONSTEXPR inline ushort unicode() const Q_DECL_NOTHROW

      { return ushort(uchar(ch)); }

      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:63:1: error: expected expression
      public:
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:333:24: error: token is not a valid binary operator in a preprocessor subexpression
      #if QT_DEPRECATED_SINCE(5, 3)
      ~~~~~~~~~~~~~~~~~~~^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:390:24: error: token is not a valid binary operator in a preprocessor subexpression
      #if QT_DEPRECATED_SINCE(5, 3)
      ~~~~~~~~~~~~~~~~~~~^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:422:24: error: token is not a valid binary operator in a preprocessor subexpression
      #if QT_DEPRECATED_SINCE(5, 0)
      ~~~~~~~~~~~~~~~~~~~^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:429:24: error: token is not a valid binary operator in a preprocessor subexpression
      #if QT_DEPRECATED_SINCE(5, 0)
      ~~~~~~~~~~~~~~~~~~~^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:500:24: error: token is not a valid binary operator in a preprocessor subexpression
      #if QT_DEPRECATED_SINCE(5, 3)
      ~~~~~~~~~~~~~~~~~~~^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:62:21: error: variable has incomplete type 'class Q_CORE_EXPORT'
      class Q_CORE_EXPORT QChar {
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:62:7: note: forward declaration of 'Q_CORE_EXPORT'
      class Q_CORE_EXPORT QChar {
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:571:1: error: C++ requires a type specifier for all declarations
      Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE);
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:571:27: error: use of undeclared identifier 'Q_MOVABLE_TYPE'
      Q_DECLARE_TYPEINFO(QChar, Q_MOVABLE_TYPE);
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:573:41: error: unknown type name 'QChar'
      Q_DECL_CONSTEXPR inline bool operator==(QChar c1, QChar c2) Q_DECL_NOTHROW

      { return c1.ucs == c2.ucs; }
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:573:51: error: unknown type name 'QChar'
      Q_DECL_CONSTEXPR inline bool operator==(QChar c1, QChar c2) Q_DECL_NOTHROW { return c1.ucs == c2.ucs; }

      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:574:41: error: unknown type name 'QChar'
      Q_DECL_CONSTEXPR inline bool operator< (QChar c1, QChar c2) Q_DECL_NOTHROW

      { return c1.ucs < c2.ucs; }
      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:574:51: error: unknown type name 'QChar'
      Q_DECL_CONSTEXPR inline bool operator< (QChar c1, QChar c2) Q_DECL_NOTHROW { return c1.ucs < c2.ucs; }

      ^
      ../../Qt/5.7/ios/include/QtCore/qchar.h:576:41: error: unknown type name 'QChar'
      Q_DECL_CONSTEXPR inline bool operator!=(QChar c1, QChar c2) Q_DECL_NOTHROW

      { return !operator==(c1, c2); }

      ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]

        • BUILD FAILED **

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

            vestbo Tor Arne Vestbø
            lqsa lqsa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes