1

我正在尝试根据http://wiki.qt.io/Building_Qt_5_from_Git的描述构建 Qt 5.4.1,但没有成功。有趣的是:我得到一个关于一些丢失符号的链接器错误,而不是关于可能来自丢失附加包的丢失库的错误!所以我假设 Qt 本身存在问题。这就是我正在做的事情:

使用VS2013在windows下构建,配置如下:

-debug-and-release -release -force-debug-info -nomake tests -nomake examples -qt-zlib -qt-libjpeg -qt-libpng -opengl desktop -plugin-sql-sqlite

在使用“nmake”成功构建很长时间后,它最终失败并出现以下错误:

link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.41 /MANIFEST:embed /OUT:D:\Qt\Qt5.4.1\5.4.1\src\qtbase\lib\Qt5WebKit.dll@C:\Users\USER~1\AppData\Local\Temp\nm4CC8.tmp
Creating library D:\Qt\Qt5.4.1\5.4.1\src\qtbase\lib\Qt5WebKit.lib and object D:\Qt\Qt5.4.1\5.4.1\src\qtbase\lib\Qt5WebKit.exp WebCore.lib(TextAllInOne.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl WebCore::TextCodecWin::registerExtendedEncodingNames(void (__cdecl*)(char const *,char const *))" (?registerExtendedEncodingNames@TextCodecWin@WebCore@@SAXP6AXPBD0@Z@Z) referenced in function "char const * __cdecl WebCore::atomicCanonicalTextEncodingName<unsigned char>(unsigned char const *,unsigned int)" (??$atomicCanonicalTextEncodingName@E@WebCore@@YAPBDPBEI@Z)WebCore.lib(TextAllInOne.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl WebCore::TextCodecWin::registerExtendedCodecs(void (__cdecl*)(char const *,class WTF::PassOwnPtr<class WebCore::TextCodec> (__cdecl*)(class WebCore::TextEncoding const &,void const *),void const *))" (?registerExtendedCodecs@TextCodecWin@WebCore@@SAXP6AXPBDP6A?AV?PassOwnPtr@VTextCodec@WebCore@@@WTF@@ABVTextEncoding@2@PBX@Z2@Z@Z) referenced in function "char const * __cdecl WebCore::atomicCanonicalTextEncodingName<unsigned char>(unsigned char const *,unsigned int)" (??atomicCanonicalTextEncodingName@E@WebCore@@YAPBDPBEI@Z)
D:\Qt\Qt5.4.1\5.4.1\src\qtbase\lib\Qt5WebKit.dll : fatal error LNK1120: 2 unresolved externals

为了更容易阅读,这是链接器错误消息的相关部分:

unresolved external symbol "public: static void __cdecl WebCore::TextCodecWin::registerExtendedCodecs(void (__cdecl*)(char const *,class WTF::PassOwnPtr<class WebCore::TextCodec> (__cdecl*)(class WebCore::TextEncoding const &,void const *),void const *))"(?registerExtendedCodecs@TextCodecWin@WebCore@@SAXP6AXPBDP6A?AV?PassOwnPtr@VTextCodec@WebCore@@@WTF@@ABVTextEncoding@2@PBX@Z2@Z@Z)
referenced in function "char const * __cdecl WebCore::atomicCanonicalTextEncodingName<unsigned char>(unsigned char const *,unsigned int)" (??atomicCanonicalTextEncodingName@E@WebCore@@YAPBDPBEI@Z)

任何想法如何解决这个问题?

4

1 回答 1

1

您可以更改#if OS(WINDOWS)#if OS(WINCE)in qtwebkit/Source/WebCore/platform/text/TextEncodingRegistry.cpp:301in extendTextCodecMaps

查看 ChangeLog-2012-10-02,它最初仅用于 Windows CE。

于 2015-07-30T11:25:10.087 回答