I am using qt 4.8.5 with VS 2008 and faced a problem about /Zc:wchar_t /Zc:wchar_t-
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
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.....
Hi, in such case, you can
- Re-compile your Qt4.8.5 with /Zc:wchar_t
- Re-compile your ICU with /Zc:wchar_t-
Using qt 5.x, the problem is gone.