我正在努力让Qt 5.4为WEC构建。我正在使用 Toradex SDK (http://developer.toradex.com/software-resources/arm-family/windows-ce/development-tools#Visual_Studio_2008)。我可以使用"配置 –platform win32-msvc2008 –xplatform wince70embedded-armv4i-msvc2008"进行配置,但构建失败,出现许多链接问题,如下所示:
moc_qabstractitemmodel.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qstringlistmodel.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qeventdispatcher_win_p.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
Qt5Cored_pch.obj : error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::Lockit(void)” (_imp??1_Lockit@std@@QAA@XZ) referenced in function “public: __cdecl std::_String_const_iterator<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >::_String_const_iterator<unsigned short,struct std::char_traits<unsigned short>,class std::allocator<unsigned short> >(void)” (??1?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAA@XZ)
moc_qtimeline.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qfilesystemwatcher_p.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qfilesystemwatcher_polling_p.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qfilesystemwatcher_win_p.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qxmlstream.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qabstractanimation_p.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qfuturewatcher.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
moc_qeasingcurve.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimetypeparser.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimemagicrule.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimeglobpattern.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimeprovider.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qsignaltransition.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qeventtransition.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimedatabase.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qmimetype.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qstate.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qfinalstate.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qhistorystate.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qabstracttransition.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
qeventdispatcher_win.obj : error LNK2001: unresolved external symbol “__declspec(dllimport) public: __cdecl std::Lockit::~_Lockit(void)” (_imp_??1_Lockit@std@@QAA@XZ)
然后,它最终失败,并显示:
....\lib\Qt5Cored.dll:致命错误LNK1120:24 个未解析的外部
我遵循这些指示 http://doc.qt.io/qt-5/install-wince.html、http://doc.qt.io/qt-5/windowsce-customization.html、http://doc.qt.io/qt-5/requirements-wince.html。
nmake 的完整输出可以在这里找到 https://onedrive.live.com/redir?resid=C4C880935B574748!90413&authkey=!ALtPVXdc7CKS1Uk&ithint=file,txt .
这已经是我一直在为此苦苦挣扎的第三天了,我终于没有东西可以尝试了,请帮忙!
编辑:我想我应该从一开始就添加这个,但这是我想出的qmake.conf:
# qmake configuration for Windows Embedded Compact 7 with VS2008 on ARM targets
#
# This is just a template for creating WEC7 mkspecs for ARM targets
# Replace the SDK name with actual SDK name.
include(../common/wince/qmake.conf)
CE_SDK = SDK2wince7
CE_ARCH = ARMV4I
DEFINES += QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE=0x700 $$CE_ARCH _AMRV7_ armv7 _ARM_
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /ENTRY:mainACRTStartup
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB
QMAKE_LFLAGS_DLL = /SUBSYSTEM:WINDOWSCE,7.00 /MACHINE:THUMB /DLL /SAFESEH:NO
QMAKE_LIBFLAGS_RELEASE = /LTCG
QMAKE_LIBS = corelibc.lib coredll.lib
QMAKE_LIBS_CORE = corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib coredll.lib winsock.lib
QMAKE_LIBS_GUI = ceshell.lib ole32.lib $$QMAKE_LIBS_CORE
QMAKE_LIBS_NETWORK = ws2.lib $$QMAKE_LIBS_GUI
QMAKE_LIBS_OPENGL =
QMAKE_LIBS_COMPAT =
QMAKE_LIBS_OPENVG = libopenvg.lib
QMAKE_LIBS_OPENGL_ES2 = libEGL.lib libGLESv2.lib
QMAKE_RC = rc
QMAKE_COMPILER_DEFINES -= _MSC_VER=1400
QMAKE_COMPILER_DEFINES += _MSC_VER=1500
与这个问题有关:std::_lockit有什么作用?您是在构建调试版本还是启用某些调试功能?我会在内部检查是否有人在 CE 上构建了这个版本,并通知您。
您可以在此处找到带有OpenGL标头的Nvidia Tegra SDK:http://developer.download.nvidia.com/tegra/files/ce6_tegra_250_5265393.msi
我预计KDAB很快就会有一个预构建版本,准备使用Windows Embedded Compact Version,但最好是直接与他们联系:http://www.kdab.com/about-us/people-europe/