[Development] Build QtCreator failed use MSVC2010

Loaden loaden at gmail.com
Sat Aug 25 11:03:50 CEST 2012


This build error still exist on Qt5 beta 1.

2012/7/17 Loaden <loaden at gmail.com>

> 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
>
>


-- 
Best Regards
Yuchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120825/cd2baa50/attachment.html>


More information about the Development mailing list