我试图在Windows 7上使用MSVC2013针对静态构建的Qt(5.4)构建PyQt(4.11.3)。
从VS2013 x86 Native Tools命令提示符我正在运行python configure.py -w -u -g
以使用'consolidate' option构建调试版本,但是我收到了一堆与Windows系统相关的链接器错误调用
可能出现什么问题?有没有办法指定configure.py
在哪里找到包含缺失符号的库?
configure.py输出:
Determining the layout of your Qt installation...
J:\Build\Libraries\QtStatic\qtbase\bin\qmake.exe -o qtdirs.mk qtdirs.pro
nmake -f qtdirs.mk debug
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f qtdirs.mk.Debug
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zm200 -Zc:wchar_t -FS -Zi -MTd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\qtdirs.pdb -DUNICODE -DWIN32 -DQT_CORE_LIB -I"..\QtStatic\qtbase\include" -I"..\QtStatic\qtbase\include\QtCore" -I"debug" -I"..\QtStatic\qtbase\mkspecs\win32-msvc2013" -Fodebug\ @C:\Users\Nick\AppData\Local\Temp\nmB354.tmp
qtdirs.cpp
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\qtdirs.exe @C:\Users\Nick\AppData\Local\Temp\nmBCD6.tmp
Creating library debug\qtdirs.lib and object debug\qtdirs.exp
Qt5Cored.lib(qcoreapplication.obj) : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function __catch$??1QCoreApplication@@UAE@XZ$0
Qt5Cored.lib(qcoreapplication_win.obj) : error LNK2001: unresolved external symbol __imp__CommandLineToArgvW@8
qtmaind.lib(qtmain_win.obj) : error LNK2001: unresolved external symbol __imp__CommandLineToArgvW@8
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function "public: virtual bool __thiscall QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>)" (?processEvents@QEventDispatcherWin32@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function "public: virtual bool __thiscall QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>)" (?processEvents@QEventDispatcherWin32@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function "public: virtual bool __thiscall QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>)" (?processEvents@QEventDispatcherWin32@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__PostMessageW@16 referenced in function "public: virtual bool __thiscall QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>)" (?processEvents@QEventDispatcherWin32@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "long __stdcall qt_internal_proc(struct HWND__ *,unsigned int,unsigned int,long)" (?qt_internal_proc@@YGJPAUHWND__@@IIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__RegisterClassW@4 referenced in function "public: __thiscall QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext(void)" (??0QWindowsMessageWindowClassContext@@QAE@XZ)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__UnregisterClassW@8 referenced in function "public: __thiscall QWindowsMessageWindowClassContext::~QWindowsMessageWindowClassContext(void)" (??1QWindowsMessageWindowClassContext@@QAE@XZ)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "struct HWND__ * __cdecl qt_create_internal_window(class QEventDispatcherWin32 const *)" (?qt_create_internal_window@@YAPAUHWND__@@PBVQEventDispatcherWin32@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "public: virtual __thiscall QEventDispatcherWin32Private::~QEventDispatcherWin32Private(void)" (??1QEventDispatcherWin32Private@@UAE@XZ)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__GetQueueStatus@4 referenced in function "long __stdcall qt_GetMessageHook(int,unsigned int,long)" (?qt_GetMessageHook@@YGJHIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__MsgWaitForMultipleObjectsEx@20 referenced in function "public: virtual bool __thiscall QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>)" (?processEvents@QEventDispatcherWin32@@UAE_NV?$QFlags@W4ProcessEventsFlag@QEventLoop@@@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__SetTimer@16 referenced in function "long __stdcall qt_GetMessageHook(int,unsigned int,long)" (?qt_GetMessageHook@@YGJHIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__KillTimer@8 referenced in function "long __stdcall qt_internal_proc(struct HWND__ *,unsigned int,unsigned int,long)" (?qt_internal_proc@@YGJPAUHWND__@@IIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__GetWindowLongW@8 referenced in function "long __stdcall qt_internal_proc(struct HWND__ *,unsigned int,unsigned int,long)" (?qt_internal_proc@@YGJPAUHWND__@@IIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__SetWindowLongW@12 referenced in function "struct HWND__ * __cdecl qt_create_internal_window(class QEventDispatcherWin32 const *)" (?qt_create_internal_window@@YAPAUHWND__@@PBVQEventDispatcherWin32@@@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__SetWindowsHookExW@16 referenced in function "protected: void __thiscall QEventDispatcherWin32::installMessageHook(void)" (?installMessageHook@QEventDispatcherWin32@@IAEXXZ)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__UnhookWindowsHookEx@4 referenced in function "protected: void __thiscall QEventDispatcherWin32::uninstallMessageHook(void)" (?uninstallMessageHook@QEventDispatcherWin32@@IAEXXZ)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol __imp__CallNextHookEx@16 referenced in function "long __stdcall qt_GetMessageHook(int,unsigned int,long)" (?qt_GetMessageHook@@YGJHIJ@Z)
Qt5Cored.lib(qeventdispatcher_win.obj) : error LNK2019: unresolved external symbol _WSAAsyncSelect@16 referenced in function "public: void __thiscall QEventDispatcherWin32Private::doWsaAsyncSelect(int)" (?doWsaAsyncSelect@QEventDispatcherWin32Private@@QAEXH@Z)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__OpenProcessToken@12 referenced in function "public: static class QString __cdecl QFileSystemEngine::homePath(void)" (?homePath@QFileSystemEngine@@SA?AVQString@@XZ)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__CopySid@12 referenced in function "void __cdecl resolveLibs(void)" (?resolveLibs@@YAXXZ)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__FreeSid@4 referenced in function "public: __thiscall SidCleanup::~SidCleanup(void)" (??1SidCleanup@@QAE@XZ)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__GetLengthSid@4 referenced in function "void __cdecl resolveLibs(void)" (?resolveLibs@@YAXXZ)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__GetTokenInformation@20 referenced in function "void __cdecl resolveLibs(void)" (?resolveLibs@@YAXXZ)
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__CoUninitialize@0 referenced in function "class QString __cdecl readLink(class QFileSystemEntry const &)" (?readLink@@YA?AVQString@@ABVQFileSystemEntry@@@Z)
Qt5Cored.lib(qfsfileengine_win.obj) : error LNK2001: unresolved external symbol __imp__CoUninitialize@0
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__CoCreateInstance@20 referenced in function "class QString __cdecl readLink(class QFileSystemEntry const &)" (?readLink@@YA?AVQString@@ABVQFileSystemEntry@@@Z)
Qt5Cored.lib(qfsfileengine_win.obj) : error LNK2001: unresolved external symbol __imp__CoCreateInstance@20
Qt5Cored.lib(qfilesystemengine_win.obj) : error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function "class QString __cdecl readLink(class QFileSystemEntry const &)" (?readLink@@YA?AVQString@@ABVQFileSystemEntry@@@Z)
Qt5Cored.lib(qfsfileengine_win.obj) : error LNK2001: unresolved external symbol __imp__CoInitialize@4
Qt5Cored.lib(qsettings.obj) : error LNK2019: unresolved external symbol __imp__SHGetSpecialFolderPathW@16 referenced in function __catch$??1QConfFileSettingsPrivate@@UAE@XZ$0
Qt5Cored.lib(qstandardpaths_win.obj) : error LNK2001: unresolved external symbol __imp__SHGetSpecialFolderPathW@16
Qt5Cored.lib(qwindowscodec.obj) : error LNK2019: unresolved external symbol __imp__CharNextExA@12 referenced in function "public: class QString __thiscall QWindowsLocalCodec::convertToUnicodeCharByChar(char const *,int,struct QTextCodec::ConverterState *)const " (?convertToUnicodeCharByChar@QWindowsLocalCodec@@QBE?AVQString@@PBDHPAUConverterState@QTextCodec@@@Z)
Qt5Cored.lib(quuid.obj) : error LNK2019: unresolved external symbol __imp__CoCreateGuid@4 referenced in function "public: static class QUuid __cdecl QUuid::createUuid(void)" (?createUuid@QUuid@@SA?AV1@XZ)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function "void __cdecl allKeys(struct HKEY__ *,class QString const &,class QMap<class QString,class QString> *)" (?allKeys@@YAXPAUHKEY__@@ABVQString@@PAV?$QMap@VQString@@V1@@@@Z)
Qt5Cored.lib(qtimezoneprivate_win.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegCreateKeyExW@36 referenced in function "struct HKEY__ * __cdecl createOrOpenKey(struct HKEY__ *,unsigned long,class QString const &)" (?createOrOpenKey@@YAPAUHKEY__@@PAU1@KABVQString@@@Z)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegDeleteKeyW@8 referenced in function "void __cdecl deleteChildGroups(struct HKEY__ *)" (?deleteChildGroups@@YAXPAUHKEY__@@@Z)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegDeleteValueW@8 referenced in function "public: virtual void __thiscall QWinSettingsPrivate::remove(class QString const &)" (?remove@QWinSettingsPrivate@@UAEXABVQString@@@Z)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegEnumKeyExW@32 referenced in function "class QStringList __cdecl childKeysOrGroups(struct HKEY__ *,enum QSettingsPrivate::ChildSpec)" (?childKeysOrGroups@@YA?AVQStringList@@PAUHKEY__@@W4ChildSpec@QSettingsPrivate@@@Z)
Qt5Cored.lib(qtimezoneprivate_win.obj) : error LNK2001: unresolved external symbol __imp__RegEnumKeyExW@32
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegEnumValueW@32 referenced in function "class QStringList __cdecl childKeysOrGroups(struct HKEY__ *,enum QSettingsPrivate::ChildSpec)" (?childKeysOrGroups@@YA?AVQStringList@@PAUHKEY__@@W4ChildSpec@QSettingsPrivate@@@Z)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegFlushKey@4 referenced in function "public: virtual void __thiscall QWinSettingsPrivate::sync(void)" (?sync@QWinSettingsPrivate@@UAEXXZ)
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegOpenKeyExW@20 referenced in function "struct HKEY__ * __cdecl openKey(struct HKEY__ *,unsigned long,class QString const &)" (?openKey@@YAPAUHKEY__@@PAU1@KABVQString@@@Z)
Qt5Cored.lib(qtimezoneprivate_win.obj) : error LNK2001: unresolved external symbol __imp__RegOpenKeyExW@20
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegQueryInfoKeyW@48 referenced in function "class QStringList __cdecl childKeysOrGroups(struct HKEY__ *,enum QSettingsPrivate::ChildSpec)" (?childKeysOrGroups@@YA?AVQStringList@@PAUHKEY__@@W4ChildSpec@QSettingsPrivate@@@Z)
Qt5Cored.lib(qtimezoneprivate_win.obj) : error LNK2001: unresolved external symbol __imp__RegQueryInfoKeyW@48
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegQueryValueExW@24 referenced in function "public: bool __thiscall QWinSettingsPrivate::readKey(struct HKEY__ *,class QString const &,class QVariant *)const " (?readKey@QWinSettingsPrivate@@QBE_NPAUHKEY__@@ABVQString@@PAVQVariant@@@Z)
Qt5Cored.lib(qtimezoneprivate_win.obj) : error LNK2001: unresolved external symbol __imp__RegQueryValueExW@24
Qt5Cored.lib(qsettings_win.obj) : error LNK2019: unresolved external symbol __imp__RegSetValueExW@24 referenced in function "public: virtual void __thiscall QWinSettingsPrivate::set(class QString const &,class QVariant const &)" (?set@QWinSettingsPrivate@@UAEXABVQString@@ABVQVariant@@@Z)
Qt5Cored.lib(qstandardpaths_win.obj) : error LNK2019: unresolved external symbol __imp__CoTaskMemFree@4 referenced in function "public: static class QString __cdecl QStandardPaths::writableLocation(enum QStandardPaths::StandardLocation)" (?writableLocation@QStandardPaths@@SA?AVQString@@W4StandardLocation@1@@Z)
debug\qtdirs.exe : fatal error LNK1120: 43 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
答案 0 :(得分:0)
这些是Windows库,您必须在构建过程中指定它们
很可能你错过了:
Advapi32.lib
SHELL32.LIB
USER32.LIB
KERNEL32.LIB
Ole32.lib
对于其他缺失符号,您可以搜索msdn:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa379295(v=vs.85).aspx