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

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.2.0 Beta1
    • Fix Version/s: None
    • Component/s: Build tools: Other
    • Labels:
      None
    • Environment:
      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

            Assignee:
            buddenha Oswald Buddenhagen
            Reporter:
            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