当前位置:首页 » 编程软件 » qt编译成32位的库

qt编译成32位的库

发布时间: 2025-04-15 23:21:05

Ⅰ Qt+Mysql开发笔记:Qt5.9.3的mingw32版本编译MySql8版本驱动并Demo连接数据库测试

前言

为了实现更好的跨平台兼容,本文将详细介绍如何在Qt5.9.3 mingw32版本下编译MySQL8版本的驱动库,并通过示例连接数据库进行测试。具体操作将涉及环境配置、驱动编译、库替换、应用构建和数据库配置等步骤。

编译环境

本示例使用Qt5.9.3与mingw32环境,确保在开发环境中选择源码安装选项。同时,下载并安装MySQL-installer-community-8.0.16.0。

下载数据库

从 downloads.mysql.com/arc... 获取32位驱动运行程序并解压

编译MySQL驱动库

步骤一:安装Qt5.9.3并勾选mingw32版本。

步骤二:下载并解压32位数据库运行包。

步骤三:在Qt Creator中打开MySQL源码工程。

步骤四:执行qmake并进行构建。

构建成功后,库将生成在根目录下。

步骤五:替换插件中的MySQL库。

步骤六:将libmysql.dll拷贝至bin目录,确保在运行环境可用。

步骤七:编译应用并连接测试。

应用成功编译并提示驱动连接无误。

步骤八:配置数据库账号允许远程操作。

修改数据库用户的配置,允许远程登录。

步骤九:测试远程操作工具连接。

由于MySQL8加密规则变更,客户端连接软件不支持新的加密方式。调整数据库用户加密方式至旧验证模式。

总结

通过本文,您已学会如何在Qt5.9.3 mingw32版本下编译并配置MySQL8版本驱动库,实现了与数据库的成功连接。在进行应用打包时,确保libmysql.dll被正确复制,以确保跨平台运行无误。

Ⅱ qt-opensource-linux-x64-5.6.3.run有没有对应的32位版本,官网上没找到,有什么办法可以解决

建议用 5.5.1 ,功能差不了太多,要不就得自己在32位系统下从源码编译Qt了。

http://download.qt.io/archive/qt/5.5/5.5.1/

先确认必须在32位系统下使用的必要性。再看看5.6的新功能是否有必须用到的。

New Features in Qt 5.6

New Features

  • Qt Core

  • Reced memory usage of dynamic properties

  • Allow logging directly to syslog on Linux systems

  • Added QStorageInfo::blockSize()

  • new QVersionNumber class

  • Added key_iterator to QHash and QMap

  • Added const_iterator QByteArray

  • Added reverse iterator support to all sequential containers

  • added QDir::listSeparator()

  • Lots of performance optimisations in QString

  • Qt Network

  • Added QHostAddress::isMulticast()

  • Support HTTP redirection in QNetworkAccessManager

  • Qt GUI

  • Improved cross-platform OpenGL ES 3.0 and 3.1 support to help the development of mobile/embedded apps utilizing GLES3 features.

  • Improved cross-platform high-dpi support.

  • Raster engine support for rendering internally with 16bits-per-color.

  • QImageReader now exports gamma values and other meta data for some image formats

  • Qt Widgets

  • Allow programmatic resizing of dock widgets

  • Allow dropping dock widgets into floating docks

  • Allow the user to re-arrange tabified docks

  • Allow horizontal scrolling using a mouse wheel in QListView

  • QOpenGLWidget and QQuickWidget are now supported on WinRT

  • Qt Testlib

  • More stable input event handling

  • Qt Multimedia

  • New Playlist QML type.

  • New audio role API for the media player (C++ and QML)

  • Support for camera focus and video probe on WinRT

  • New functions in QML AudioEngine to support dynamic object creation

  • Qt WebEngine

  • Based on Chromium 45

  • Support for pepper plugins including Flash

  • Support for unbundling and linking with system libraries on Linux

  • Support for following global Qt proxy settings.

  • More WebActions from QtWebKit and WebAction API in QML.

  • New QtWebEngineCore mole for shared low-level API

  • New core API for custom URL schemes

  • New core API for intercepting and blocking network requests

  • New core API for tracking or blocking cookies.

  • Qt QML

  • Support for writing JavaScript function names to Linux's perf output

  • Reced overall memory consumption

  • Moved all the debug services into plugins. Custom debug services can be added width additional plugins.

  • Font rendering

  • Optional support for using FreeType on Mac OS X

  • Embedded platforms

  • Added support for NVIDIA Jetson TK1 Pro boards running Vibrante Linux via a new eglfs backend utilizing DRM, EGLDevice and EGLStream

  • Added support for Intel Atom-based NUCs

  • Desktop platforms

  • Windows 10 fully supported (classic and WinRT app)

  • Windows Store apps are now composited inside a XAML layer, allowing for better integration with the native UI layer

  • Windows embedded

  • Added support for WEC2013

  • Qt WebView

  • Added support for WinRT

  • Qt Canvas3D

  • Support for using Qt Quick items as textures

  • Support for rendering directly to Qt Quick scene background or foreground

  • Qt Nfc

  • Added support for Android

  • Qt Positioning

  • Added support for OS X

  • Added support for GPS receivers exposed as a serial port on Windows desktop (all versions)

  • Removed libgeoclue dependency for the GeoClue backend

  • Qt Location

  • Added the Qt Location mole providing maps, navigation and places APIs for Qt Quick

  • Other Changes

  • Embedded platforms

  • libinput, when present, is now the default for eglfs and linuxfb

  • Image Formats

  • For security reasons, the MNG and JPEG 2000 handlers will by default no longer be built, unless the corresponding codec libraries are provided by the OS. Hence, the binary Qt releases for Windows and Mac will not contain prebuilt handlers for those formats, but users can still build them from source.

  • Deprecated Moles

    The following moles are part of Qt 5.6 release, but deprecated and considered for removal in subsequent releases of Qt:

  • Qt Script

  • Qt Enginio

  • Removed Moles

    With Qt 5.6 the following moles are no longer part of the release packages, but users can still build them from source:

  • Qt WebKit

  • Qt Declarative (Qt Quick 1)

Ⅲ 64位系统上装32位的Qt,用来开发64位的程序,这样可以吗

基本类型在 64位系统和 32位系统不一样,指令集也有区别。64位编译的程序不能直接链接到32位的库。链接库的位必须兼容。64位链接32位,链接会失败。必须安装qt64bit。

Ⅳ qt 5 在64位系统下怎么会是32位的环境

看你安装的是什么版本的吧,在64位也能安装32程序当然也能配置32位的环境啦。
之前有个工程要调用32的库,在vs中使用msvc2015编译器编译qt工程,下载的qt是64位的只好重新下载一个32位的qt。

Ⅳ qt 64 位编程和32位编程的区别

一、64位编译器系统下可以使用64位的无符号或有符号变量了。
二、64位操作系统提供了更多的编程接口API,这些多出来的接口主要是涉及将32位数据类型扩展为64位的问题了。比如原来关于内存管理相关的函数,参数是32位的,在64位操作系统下就需要提供参数为64位的管理函数了等等。

Ⅵ ubuntu64位怎么编译32位qt库

64位可以编32位的程序出来,在各种FLAGS中增加 -m32 编出来的就是32位程序,连接时自然是找32位的共享库
这个要看发行版对32位支持的实现,比如gentoo下如果开abi支持双架构那很可能悲剧,因为有些包还没跟上,如果用binary的32位库又会因为版本不同出现莫名其妙的问题,比如fontconfig的坑。
我在64位编32位程序都是使用chroot的方法,这样就可以把32位的头文件库什么的全放在某个地方。我用的是ubuntu,32位库和64位库位置不一样,一般可以直接安装32位的库,如果遇到某些比较特殊的库,一般都可以通过重新编译增加rpath解决,如果没源码也可以用patchelf直接给elf上rpath。
如果您认可我的答案,请采纳。

您的采纳,是我答题的动力,O(∩_∩)O谢谢!!

热点内容
pilpython安装 发布:2025-04-25 17:12:55 浏览:804
安卓手机usb偏好设置在哪里 发布:2025-04-25 17:02:53 浏览:572
梁箍筋加密区间 发布:2025-04-25 17:02:10 浏览:425
大同忘记密码找回多少钱 发布:2025-04-25 16:55:22 浏览:985
手机ip被加入黑名单限制访问 发布:2025-04-25 16:40:51 浏览:731
内网的服务器地址怎么查 发布:2025-04-25 16:29:32 浏览:926
视频缓存下载浏览器 发布:2025-04-25 16:21:53 浏览:1002
批量抖音脚本 发布:2025-04-25 15:58:10 浏览:836
运行极品飞车电脑要有什么配置 发布:2025-04-25 15:51:35 浏览:418
sql动态传参数 发布:2025-04-25 15:37:50 浏览:631