Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I am using qt 4.8.5 with VS 2008 and faced a problem about /Zc:wchar_t /Zc:wchar_t-
Forum Updated to NodeBB v4.3 + New Features

I am using qt 4.8.5 with VS 2008 and faced a problem about /Zc:wchar_t /Zc:wchar_t-

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lygstate
    wrote on last edited by
    #1

    According to http://msdn.microsoft.com/en-us/library/799kze2z(v=vs.110).aspx,
    /Zc:wchar_t is the default option for MSVC, so my problem is why
    QT use /Zc:wchar_t- instead of /Zc:wchar_t, because now I want to linking with ICU
    and it's use default option /Zc:wchar_t that will cause linking error,
    so now I use
    QMAKE_CFLAGS -= -Zc:wchar_t-
    QMAKE_CXXFLAGS -= -Zc:wchar_t-
    to restore the default option.
    Is this hack acceptable? or I need to recompile ICU with the
    option -Zc:wchar_t-?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      I have faced same problem for a long time ago, and I don't know anymore why exactly you should use /Zc:wchar_t-, but there was something wrong with /Zc:wchar_t. But maybe it has benn already changed...
      You can simply recompile ICU with /Zc:wchar_t- or download working lib set... I think it is more safe and right way to go... /Zc:wchar_t - means what wchar_t will be an VS internally defined type and it may cause troubles with wchar_t <-> char conversion with some external libs or for example with QtWebKit.....

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dbzhang800
        wrote on last edited by
        #3

        Hi, in such case, you can

        • Re-compile your Qt4.8.5 with /Zc:wchar_t

        or

        • Re-compile your ICU with /Zc:wchar_t-
        1 Reply Last reply
        0
        • L Offline
          L Offline
          lygstate
          wrote on last edited by
          #4

          Using qt 5.x, the problem is gone.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved