[Qt-creator] Build QtCreator failed use MSVC2010

Loaden loaden at gmail.com
Tue Jul 17 06:11:07 CEST 2012


>
> qmakeevaluator.obj : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: static
>  class QString __cdecl QString::fromWCharArray(unsigned short const
> *,int)" (__imp_?fromWCharArray at Q
> String@@SA?AV1 at PBGH@Z) referenced in function "public: void __thiscall
> QMakeEvaluator::loadDefaults(
> void)" (?loadDefaults at QMakeEvaluator@@QAEXXZ)
> D:\qpSOFT\Projects\QtCreator\build\x86-release\lib\qtcreator\plugins\Nokia\QtSupport.dll
> : fatal err
> or LNK1120: 1 unresolved externals
>

This patch can't solved the problem:


> diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
> index 2edfc04..249088b 100644
> --- a/src/corelib/tools/qstring.h
> +++ b/src/corelib/tools/qstring.h
> @@ -818,7 +818,7 @@ inline int QString::toWCharArray(wchar_t *array) const
>      }
>      return toUcs4_helper(d->data(), size(), reinterpret_cast<uint
> *>(array));
>  }
> -inline QString QString::fromWCharArray(const wchar_t *string, int size)
> +Q_CORE_EXPORT inline QString QString::fromWCharArray(const wchar_t
> *string, int size)
>  {
>      return sizeof(wchar_t) == sizeof(QChar) ?
> fromUtf16(reinterpret_cast<const ushort *>(string), size)
>                                              :
> fromUcs4(reinterpret_cast<const uint *>(string), size);
>

-- 
Please don't ask where I come from, It's a shame!
Best Regards
Yuchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120717/943e6123/attachment.html>


More information about the Qt-creator mailing list