Mac OSX 下QT 5.13.1解决MySQL动态链接库问题

本文记录了在Mac OS X上使用Qt 5.13.1配置MySQL动态链接库时遇到的问题及解决过程。首先,作者查看官方文档,然后尝试配置,但过程中遇到了错误。经过排查,作者发现是qmake版本问题,使用Qt自带的qmake解决了问题,最终成功完成配置。
摘要由CSDN通过智能技术生成

 

又来一年一度的配置了-_-!!,最怕的就是配置了,这次要配置的是Qt mysql链接库,看网上教程发现大家配置的好溜,只有我一人出现各类问题!!

咋们先查看下官文介绍

Embedded MySQL Server
The MySQL embedded server is a drop-in replacement for the normal client library. With the embedded MySQL server, a MySQL server is not required to use MySQL functionality.
To use the embedded MySQL server, simply link the Qt plugin to libmysqld instead of libmysqlclient. This can be done by adding MYSQL_LIBS=-lmysqld to the configure command line.
Please refer to the MySQL documentation, chapter "libmysqld, the Embedded MySQL Server Library" for more information about the MySQL embedded server. 
How to Build the QMYSQL Plugin on Unix and macOS
You need the MySQL header files, as well as the shared library libmysqlclient.so. Depending on your Linux distribution, you may need to install a package which is usually called "mysql-devel".
Tell qmake where to find the MySQL header file
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值