Compiling Qt4.8.2 mysql driver using the VS2008 compiler

Source: Internet
Author: User

Prepare: Install VS2008 and Qt 4.8.2, and set environment variables (qtdir=c:\qt\4.8.2 and Path+=c:\qt\4.8.2\bin)

First, download the MySQL database, install (fully installed) to the C packing directory, set the environment variables, Path+=c:\mysql\bin.

"Start", "All Programs", "Microsoft Visual Studio," Visual Studio Tools, "Visual Studio 2008 Command Prompt", The C:\Qt\4.8.2\src\plugin\sqldrivers\mysql directory is made from the CD command at the command line.

Iii. input command: qmake-o Makefile includepath+= "C:\MySQL\include" libs+= "C:\MySQL\lib\opt\libmysql.lib" Mysql.pro

V. Input command: NMAKE.

VI. If successful, the MySQL driver file will be generated in the C:\Qt\4.8.2\plugins\sqldrivers directory.

Attention:

If you want to compile Qt4.8.2 64-bit MySQL driver with VS2008 compiler, first need to download Qt-everywhere-opensource-src-4.8.2.zip source code, extract to C:\Qt\4.8.2_ 64, and set the environment Qtdir and path,

Visual Studio Tools, "Start", "All Programs", "Visual Studio x64 Win64 command Prompt", Microsoft Visual Studio Compiles a 64-bit version of QT. then download and install

64-bit MySQL, finally compiled 64-bit MySQL driver.

Compiling Qt4.8.2 mysql driver using the VS2008 compiler

Related Article

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.