我正在尝试从Windows上的源代码构建Qt 5.10。我想我已经安装了以下所有依赖项:http://doc.qt.io/qt-5/windows-building.html
但是,我面临一个非常奇怪的问题。
我使用的配置是:configure -skip webengine -nomake examples -nomake tests
然而“jom”似乎一直试图编译测试并抛出以下错误:
C:\Qt\Qt5.10>..\jom\jom.exe > output
jom 1.1.2 - empower your cores
jom: C:\Qt\Qt5.10\qtbase\tests\auto\corelib\kernel\qcoreapplication\Makefile.Debug [debug\tst_qcoreapplication.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\corelib\kernel\qcoreapplication\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\corelib\kernel\Makefile [sub-qcoreapplication-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\corelib\Makefile [sub-kernel-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\Makefile [sub-corelib-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\image\qpixmapcache\Makefile.Debug [debug\tst_qpixmapcache.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\image\qpixmapcache\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\image\Makefile [sub-qpixmapcache-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\kernel\qhostinfo\Makefile.Debug [debug\tst_qhostinfo.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\kernel\qhostinfo\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\kernel\Makefile [sub-qhostinfo-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\access\qhttpnetworkconnection\Makefile.Debug [debug\tst_qhttpnetworkconnection.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\access\qhttpnetworkconnection\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\access\Makefile [sub-qhttpnetworkconnection-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\Makefile [sub-access-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\network\Makefile [sub-kernel-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\Makefile [sub-network-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\painting\qpathclipper\Makefile.Debug [debug\tst_qpathclipper.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\painting\qpathclipper\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\painting\Makefile [sub-qpathclipper-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\benchmarks\network\kernel\qhostinfo\Makefile.Release [release\tst_bench_qhostinfo.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\benchmarks\network\kernel\qhostinfo\Makefile [release] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\benchmarks\network\kernel\Makefile [sub-qhostinfo-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\benchmarks\network\Makefile [sub-kernel-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\benchmarks\Makefile [sub-network-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\kernel\qguiapplication\Makefile.Debug [debug\tst_qguiapplication.exe] Error 1120
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\kernel\qguiapplication\Makefile [debug] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\kernel\Makefile [sub-qguiapplication-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\Makefile [sub-kernel-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\Makefile [sub-image-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\gui\Makefile [sub-painting-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\auto\Makefile [sub-gui-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\Makefile [sub-auto-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\tests\Makefile [sub-benchmarks-make_first] Error 2
jom: C:\Qt\Qt5.10\qtbase\Makefile [sub-tests-make_first] Error 2
jom: C:\Qt\Qt5.10\Makefile [module-qtbase-make_first] Error 2
以下是构建过程中遇到的错误:
tst_qcoreapplication.obj : error LNK2019: unresolved external symbol "public: static class QThreadData * __cdecl QThreadData::current(bool)" (?current@QThreadData@@SAPAV1@_N@Z) referenced in function "private: virtual void __thiscall Thread::run(void)" (?run@Thread@@EAEXXZ)
debug\tst_qcoreapplication.exe : fatal error LNK1120: 1 unresolved externals
tst_qpixmapcache.obj : error LNK2019: unresolved external symbol "int __cdecl q_QPixmapCache_keyHashSize(void)" (?q_QPixmapCache_keyHashSize@@YAHXZ) referenced in function "private: void __thiscall tst_QPixmapCache::noLeak(void)" (?noLeak@tst_QPixmapCache@@AAEXXZ)
debug\tst_qpixmapcache.exe : fatal error LNK1120: 1 unresolved externals
tst_qhostinfo.obj : error LNK2019: unresolved external symbol "void __cdecl qt_qhostinfo_clear_cache(void)" (?qt_qhostinfo_clear_cache@@YAXXZ) referenced in function "private: void __thiscall tst_QHostInfo::init(void)" (?init@tst_QHostInfo@@AAEXXZ)
tst_qhostinfo.obj : error LNK2019: unresolved external symbol "void __cdecl qt_qhostinfo_enable_cache(bool)" (?qt_qhostinfo_enable_cache@@YAX_N@Z) referenced in function "private: void __thiscall tst_QHostInfo::init(void)" (?init@tst_QHostInfo@@AAEXXZ)
debug\tst_qhostinfo.exe : fatal error LNK1120: 2 unresolved externals
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: __thiscall QHttpNetworkRequest::QHttpNetworkRequest(class QUrl const &,enum QHttpNetworkRequest::Operation,enum QHttpNetworkRequest::Priority)" (??0QHttpNetworkRequest@@QAE@ABVQUrl@@W4Operation@0@W4Priority@0@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: __thiscall QHttpNetworkRequest::QHttpNetworkRequest(class QHttpNetworkRequest const &)" (??0QHttpNetworkRequest@@QAE@ABV0@@Z) referenced in function "public: static void * __cdecl QtMetaTypePrivate::QMetaTypeFunctionHelper<class QHttpNetworkRequest,1>::Construct(void *,void const *)" (?Construct@?$QMetaTypeFunctionHelper@VQHttpNetworkRequest@@$00@QtMetaTypePrivate@@SAPAXPAXPBX@Z)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall QHttpNetworkRequest::~QHttpNetworkRequest(void)" (??1QHttpNetworkRequest@@UAE@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall QHttpNetworkRequest::setHeaderField(class QByteArray const &,class QByteArray const &)" (?setHeaderField@QHttpNetworkRequest@@UAEXABVQByteArray@@0@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::compression(void)" (?compression@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: enum QHttpNetworkRequest::Priority __thiscall QHttpNetworkRequest::priority(void)const " (?priority@QHttpNetworkRequest@@QBE?AW4Priority@1@XZ) referenced in function "public: void __thiscall GetMultipleWithPrioritiesReceiver::finishedSlot(void)" (?finishedSlot@GetMultipleWithPrioritiesReceiver@@QAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: void __thiscall QHttpNetworkRequest::setPriority(enum QHttpNetworkRequest::Priority)" (?setPriority@QHttpNetworkRequest@@QAEXW4Priority@1@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities(void)" (?getMultipleWithPipeliningAndMultiplePriorities@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QHttpNetworkRequest::isPipeliningAllowed(void)const " (?isPipeliningAllowed@QHttpNetworkRequest@@QBE_NXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities(void)" (?getMultipleWithPipeliningAndMultiplePriorities@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: void __thiscall QHttpNetworkRequest::setPipeliningAllowed(bool)" (?setPipeliningAllowed@QHttpNetworkRequest@@QAEX_N@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultiple(void)" (?getMultiple@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: void __thiscall QHttpNetworkRequest::setUploadByteDevice(class QNonContiguousByteDevice *)" (?setUploadByteDevice@QHttpNetworkRequest@@QAEXPAVQNonContiguousByteDevice@@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::post(void)" (?post@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QHttpNetworkRequest __thiscall QHttpNetworkReply::request(void)const " (?request@QHttpNetworkReply@@QBE?AVQHttpNetworkRequest@@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities(void)" (?getMultipleWithPipeliningAndMultiplePriorities@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: int __thiscall QHttpNetworkReply::statusCode(void)const " (?statusCode@QHttpNetworkReply@@QBEHXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QString __thiscall QHttpNetworkReply::reasonPhrase(void)const " (?reasonPhrase@QHttpNetworkReply@@QBE?AVQString@@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: __int64 __thiscall QHttpNetworkReply::bytesAvailable(void)const " (?bytesAvailable@QHttpNetworkReply@@QBE_JXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QByteArray __thiscall QHttpNetworkReply::readAny(void)" (?readAny@QHttpNetworkReply@@QAE?AVQByteArray@@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::put(void)" (?put@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QByteArray __thiscall QHttpNetworkReply::readAll(void)" (?readAll@QHttpNetworkReply@@QAE?AVQByteArray@@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: void __thiscall QHttpNetworkReply::setDownstreamLimited(bool)" (?setDownstreamLimited@QHttpNetworkReply@@QAEX_N@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getAndThenDeleteObject(void)" (?getAndThenDeleteObject@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QHttpNetworkReply::isFinished(void)const " (?isFinished@QHttpNetworkReply@@QBE_NXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QHttpNetworkReply::isPipeliningUsed(void)const " (?isPipeliningUsed@QHttpNetworkReply@@QBE_NXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities(void)" (?getMultipleWithPipeliningAndMultiplePriorities@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QHttpNetworkConnection * __thiscall QHttpNetworkReply::connection(void)" (?connection@QHttpNetworkReply@@QAEPAVQHttpNetworkConnection@@XZ) referenced in function "public: void __thiscall tst_QHttpNetworkConnection::challenge401(class QHttpNetworkRequest const &,class QAuthenticator *)" (?challenge401@tst_QHttpNetworkConnection@@QAEXABVQHttpNetworkRequest@@PAVQAuthenticator@@@Z)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: __thiscall QHttpNetworkConnection::QHttpNetworkConnection(class QString const &,unsigned short,bool,enum QHttpNetworkConnection::ConnectionType,class QObject *,class QSharedPointer<class QNetworkSession>)" (??0QHttpNetworkConnection@@QAE@ABVQString@@G_NW4ConnectionType@0@PAVQObject@@V?$QSharedPointer@VQNetworkSession@@@@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: __thiscall QHttpNetworkConnection::QHttpNetworkConnection(unsigned short,class QString const &,unsigned short,bool,class QObject *,class QSharedPointer<class QNetworkSession>,enum QHttpNetworkConnection::ConnectionType)" (??0QHttpNetworkConnection@@QAE@GABVQString@@G_NPAVQObject@@V?$QSharedPointer@VQNetworkSession@@@@W4ConnectionType@0@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::getMultiple(void)" (?getMultiple@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall QHttpNetworkConnection::~QHttpNetworkConnection(void)" (??1QHttpNetworkConnection@@UAE@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QString __thiscall QHttpNetworkConnection::hostName(void)const " (?hostName@QHttpNetworkConnection@@QBE?AVQString@@XZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: unsigned short __thiscall QHttpNetworkConnection::port(void)const " (?port@QHttpNetworkConnection@@QBEGXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: class QHttpNetworkReply * __thiscall QHttpNetworkConnection::sendRequest(class QHttpNetworkRequest const &)" (?sendRequest@QHttpNetworkConnection@@QAEPAVQHttpNetworkReply@@ABVQHttpNetworkRequest@@@Z) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2019: unresolved external symbol "public: bool __thiscall QHttpNetworkConnection::isSsl(void)const " (?isSsl@QHttpNetworkConnection@@QBE_NXZ) referenced in function "private: void __thiscall tst_QHttpNetworkConnection::get(void)" (?get@tst_QHttpNetworkConnection@@AAEXXZ)
tst_qhttpnetworkconnection.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QHttpNetworkReply::staticMetaObject" (?staticMetaObject@QHttpNetworkReply@@2UQMetaObject@@B)
debug\tst_qhttpnetworkconnection.exe : fatal error LNK1120: 27 unresolved externals
cd qsslerror\ && ( if not exist Makefile C:\Qt\Qt5.10\qtbase\bin\qmake.exe -o Makefile C:\Qt\Qt5.10\qtbase\tests\auto\network\ssl\qsslerror\qsslerror.pro ) && C:\Qt\jom\jom.exe -f Makefile
cd qsqlerror\ && ( if not exist Makefile C:\Qt\Qt5.10\qtbase\bin\qmake.exe -o Makefile C:\Qt\Qt5.10\qtbase\tests\auto\sql\kernel\qsqlerror\qsqlerror.pro ) && C:\Qt\jom\jom.exe -f Makefile
tst_qpathclipper.obj : error LNK2019: unresolved external symbol "public: __thiscall QWingedEdge::QWingedEdge(void)" (??0QWingedEdge@@QAE@XZ) referenced in function "private: void __thiscall tst_QPathClipper::testWingedEdge(void)" (?testWingedEdge@tst_QPathClipper@@AAEXXZ)
tst_qpathclipper.obj : error LNK2019: unresolved external symbol "public: __thiscall QWingedEdge::QWingedEdge(class QPainterPath const &,class QPainterPath const &)" (??0QWingedEdge@@QAE@ABVQPainterPath@@0@Z) referenced in function "private: void __thiscall tst_QPathClipper::testWingedEdge(void)" (?testWingedEdge@tst_QPathClipper@@AAEXXZ)
tst_qpathclipper.obj : error LNK2019: unresolved external symbol "public: struct QWingedEdge::TraversalStatus __thiscall QWingedEdge::next(struct QWingedEdge::TraversalStatus const &)const " (?next@QWingedEdge@@QBE?AUTraversalStatus@1@ABU21@@Z) referenced in function "private: void __thiscall tst_QPathClipper::testWingedEdge(void)" (?testWingedEdge@tst_QPathClipper@@AAEXXZ)
tst_qpathclipper.obj : error LNK2019: unresolved external symbol "public: int __thiscall QWingedEdge::addEdge(class QPointF const &,class QPointF const &)" (?addEdge@QWingedEdge@@QAEHABVQPointF@@0@Z) referenced in function "private: void __thiscall tst_QPathClipper::testWingedEdge(void)" (?testWingedEdge@tst_QPathClipper@@AAEXXZ)
debug\tst_qpathclipper.exe : fatal error LNK1120: 4 unresolved externals
main.obj : error LNK2019: unresolved external symbol "void __cdecl qt_qhostinfo_clear_cache(void)" (?qt_qhostinfo_clear_cache@@YAXXZ) referenced in function "public: void __thiscall tst_qhostinfo::init(void)" (?init@tst_qhostinfo@@QAEXXZ)
main.obj : error LNK2019: unresolved external symbol "void __cdecl qt_qhostinfo_enable_cache(bool)" (?qt_qhostinfo_enable_cache@@YAX_N@Z) referenced in function "private: void __thiscall tst_qhostinfo::lookupSpeed(void)" (?lookupSpeed@tst_qhostinfo@@AAEXXZ)
release\tst_bench_qhostinfo.exe : fatal error LNK1120: 2 unresolved externals
tst_qcoreapplication.obj : error LNK2019: unresolved external symbol "public: static class QThreadData * __cdecl QThreadData::current(bool)" (?current@QThreadData@@SAPAV1@_N@Z) referenced in function "private: virtual void __thiscall Thread::run(void)" (?run@Thread@@EAEXXZ)
debug\tst_qguiapplication.exe : fatal error LNK1120: 1 unresolved externals
请提供有关此内容的任何见解以及如何解决此问题。任何帮助将不胜感激。
感谢!!!