编译 Qt 安装程序框架静态
Compile Qt Installer Framework static
我根据qt istaller中的说明编译了静态qt。我正在尝试组装qt安装程序。在二进制创建者模块上,链接器发出错误:
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__OpenThemeData@8 referenced in function "public: class QColor __thiscall QVistaHelper::basicWindowFrameColor(void)" (?basicWindowFrameColor@QVistaHelper@@QAE?AVQColor@@XZ)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2001: unresolved external symbol __imp__OpenThemeData@8
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__OpenThemeData@8
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__DrawThemeBackground@24 referenced in function "public: virtual void __thiscall QVistaBackButton::paintEvent(class QPaintEvent *)" (?paintEvent@QVistaBackButton@@UAEXPAVQPaintEvent@@@Z)
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__GetThemeColor@20 referenced in function "public: class QColor __thiscall QVistaHelper::basicWindowFrameColor(void)" (?basicWindowFrameColor@QVistaHelper@@QAE?AVQColor@@XZ)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemeColor@20
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemeColor@20
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__GetThemeSysFont@12 referenced in function "struct tagLOGFONTW __cdecl getCaptionLogFont(void *)" (?getCaptionLogFont@@YA?AUtagLOGFONTW@@PAX@Z)
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__IsThemeActive@0 referenced in function "private: static bool __cdecl QVistaHelper::drawBlackRect(class QRect const &,struct HDC__ *)" (?drawBlackRect@QVistaHelper@@CA_NABVQRect@@PAUHDC__@@@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2001: unresolved external symbol __imp__IsThemeActive@0
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__SetWindowThemeAttribute@16 referenced in function "public: void __thiscall QVistaHelper::setTitleBarIconAndCaptionVisible(bool)" (?setTitleBarIconAndCaptionVisible@QVistaHelper@@QAEX_N@Z)
Qt5Widgets.lib(qwizard_win.obj) : error LNK2019: unresolved external symbol __imp__DrawThemeTextEx@36 referenced in function "private: bool __thiscall QVistaHelper::drawTitleText(class QPainter *,class QString const &,class QRect const &,struct HDC__ *)" (?drawTitleText@QVistaHelper@@AAE_NPAVQPainter@@ABVQString@@ABVQRect@@PAUHDC__@@@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__CloseThemeData@4 referenced in function "public: void __thiscall QWindowsXPStylePrivate::cleanupHandleMap(void)" (?cleanupHandleMap@QWindowsXPStylePrivate@@QAEXXZ)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__DrawThemeBackgroundEx@24 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundDirectly(struct HDC__ *,class XPThemeData &,double)" (?drawBackgroundDirectly@QWindowsXPStylePrivate@@QAE_NPAUHDC__@@AAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeBackgroundRegion@24 referenced in function "public: struct HRGN__ * __thiscall XPThemeData::mask(class QWidget *)" (?mask@XPThemeData@@QAEPAUHRGN__@@PAVQWidget@@@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemePartSize@28 referenced in function "public: class QSizeF __thiscall XPThemeData::size(void)" (?size@XPThemeData@@QAE?AVQSizeF@@XZ)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemePartSize@28
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__IsThemeBackgroundPartiallyTransparent@12 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(class XPThemeData &,double)" (?drawBackgroundThruNativeBuffer@QWindowsXPStylePrivate@@QAE_NAAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeBool@20 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(class XPThemeData &,double)" (?drawBackgroundThruNativeBuffer@QWindowsXPStylePrivate@@QAE_NAAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeInt@20 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(class XPThemeData &,double)" (?drawBackgroundThruNativeBuffer@QWindowsXPStylePrivate@@QAE_NAAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemeInt@20
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeEnumValue@20 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(class XPThemeData &,double)" (?drawBackgroundThruNativeBuffer@QWindowsXPStylePrivate@@QAE_NAAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemeEnumValue@20
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeMargins@28 referenced in function "public: class QMarginsF __thiscall XPThemeData::margins(class QRect const &,int)" (?margins@XPThemeData@@QAE?AVQMarginsF@@ABVQRect@@H@Z)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemeMargins@28
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemePropertyOrigin@20 referenced in function "public: bool __thiscall QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(class XPThemeData &,double)" (?drawBackgroundThruNativeBuffer@QWindowsXPStylePrivate@@QAE_NAAVXPThemeData@@N@Z)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2001: unresolved external symbol __imp__GetThemePropertyOrigin@20
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__SetWindowTheme@12 referenced in function "private: static bool __cdecl QWindowsXPStylePrivate::initVistaTreeViewTheming(void)" (?initVistaTreeViewTheming@QWindowsXPStylePrivate@@CA_NXZ)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__IsAppThemed@0 referenced in function "public: __thiscall QWindowsXPStylePrivate::QWindowsXPStylePrivate(void)" (??0QWindowsXPStylePrivate@@QAE@XZ)
Qt5Widgets.lib(qwindowsxpstyle.obj) : error LNK2019: unresolved external symbol __imp__GetCurrentThemeName@24 referenced in function "public: virtual void __thiscall QWindowsXPStyle::drawPrimitive(enum QStyle::PrimitiveElement,class QStyleOption const *,class QPainter *,class QWidget const *)const " (?drawPrimitive@QWindowsXPStyle@@UBEXW4PrimitiveElement@QStyle@@PBVQStyleOption@@PAVQPainter@@PBVQWidget@@@Z)
Qt5Widgets.lib(qwindowsvistastyle.obj) : error LNK2019: unresolved external symbol __imp__GetThemeTransitionDuration@24 referenced in function "public: virtual void __thiscall QWindowsVistaStyle::drawControl(enum QStyle::ControlElement,class QStyleOption const *,class QPainter *,class QWidget const *)const " (?drawControl@QWindowsVistaStyle@@UBEXW4ControlElement@QStyle@@PBVQStyleOption@@PAVQPainter@@PBVQWidget@@@Z)
编译标志 qt:
configure -prefix "C:Qtstatic" -release -static -static-runtime -opensource -confirm-license -accessibility -no-opengl -no-icu -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -skip qtactiveqt -skip qtenginio -skip qtlocation -skip qtmultimedia -skip qtserialport -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtwebkit -skip qtwebsockets -skip qtxmlpatterns -skip qt3d
适用于win32-msvc2013的Qt版本5.8.0(qt-everywhere-opensource-src-5.8.0.zip(。
链接器似乎找不到该UxTheme.lib
或在构建配置中丢失。
尝试添加LIBS += -LPath_To_UxTheme -lUxTheme
。
就我而言,版本 5.5.1 有所帮助。解决方案中的详细信息编译方式:
configure -prefix "C:Qtstatic" -platform win32-msvc2013 -static -release -opensource -confirm-license -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -skip qtactiveqt -skip qtenginio -skip qtlocation -skip qtserialport -skip qtquick1 -skip qtsensors -skip qtwebkit -skip qtwebsockets -skip qtxmlpatterns -skip qt3d -opengl desktop -no-angle -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-openssl -make libs -make tools
相关文章:
- 如果C++类在类方法中具有动态分配,但没有构造函数/析构函数或任何非静态成员,那么它仍然是POD类型吗
- #为""定义宏;静态";针对不同的上下文
- cmake如何在fedora工作站中找到boost静态库包
- 静态数据成员的问题-修复链接错误会导致编译器错误
- 将公共但非静态的成员函数与ALGLIB集成
- cmake在我的项目中所需的所有静态库都不成功
- C++从另一个类访问公共静态向量的正确方法是什么
- 基于boost的程序的静态链接——zlib问题
- 在静态库中嵌入类方法
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- 如何在C++中获得"静态纯虚拟"功能?
- 私有类型的静态常量成员
- 使用gcc从静态链接的文件中查找可选符号
- 在 .h 文件中的类中声明静态变量和在.cpp文件中声明"global"变量有什么区别
- 用于C++的静态二进制检测或二进制重写工具和框架
- 静态链接到 CMake 中的 macOS 框架
- 如何使用 c++ 源代码和静态库创建 iOS 框架
- 构建一个真正、完全静态的Qt 5框架和应用程序(Qt 5.8之后)
- 编译 Qt 安装程序框架静态
- 如何在 Xcode Objective-C Project 中的 .mm 类扩展中导入/使用 swift 静态库/框架