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

CMake files doesn't ensure same wchar_t size as Qt was built with

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.2.0 Beta1
    • Build tools: Other
    • None
    • Windows

    Description

      When using e.g. QString::fromWCharArray (or one of the related ones) build fails in at least debug mode because the size of wchar_t is different in the default cmake configuration than what Qt is built with by default.

      I would have expected the cmake bits to set that up for me automatically.

      Compiler errors are reported like this:
      karchivetest.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dll
      import) public: static class QString __cdecl QString::fromWCharArray(unsigned sh
      ort const *,int)" (_imp?fromWCharArray@QString@@SA?AV1@PBGH@Z)
      karchivetest.exe : fatal error LNK1120: 1 unresolved externals
      LINK Pass 1 failed. with 1120

      It is apparantly a command line switch to msvc what size a wchar_t is.

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            svuorela Sune Vuorela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes