Deploying QT+MYSQL programs on new machines

Source: Internet
Author: User

1, the general situation needs to be qt5core.dll,qt5gui.dll,qt5sql.dll,qt5widgets.dll,platforms\qwindows.dll

Msvcp120.dll,msvcp120.dll (I'm using the VS2013 version of Qt5.5)

Plugins\sqldrivers\qsqlmysql.dll (sometimes you need to recompile this file, see another article on how to compile the MySQL plugin)

Libmysql.dll (Copy from MySQL5.5 's installation directory)

The above DLL files and EXE are put together

2. Require the MySQL server to open the Remote connection account (see another essay)

3. Add in Code

QString Strlibpath (qdir::tonativeseparators (Appdir) +qdir::separator () + "plugins");
Qcoreapplication::addlibrarypath (Strlibpath);
Otherwise, it will appear

Driver not loaded

Error

Deploying QT+MYSQL programs on new machines

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.