mysql++ VS2013 Environment Configuration

Source: Internet
Author: User

Recently in the study mysql++ operation MySQL database. With vs2013, originally thought is very simple, but really use up really all kinds of pits, all kinds of compile connection error, make the even burn.

After an afternoon, I finally got through the compilation. This blog summarizes the various issues of attention, so that the use of mysql++ new students after less detours.

First, download mysql++; This is not much to say. After the download is complete there are various files, we need to be Lib folder files.

B. Copy the Lib folder into the project directory and add all the files to the project.

Third, (note) Start adding header files at common.h #include <WinSock2.h> #include <windows.h> note the order of additions, if you first add window.h, a redefinition error will occur.

Four, modify the common.h of about 105 lines of the class capacity is not compiled but #define Mysqlpp_export __declspec (dllimport) revision changed to

#define Mysqlpp_export __declspec (dllexport)

V. Modify the project properties: Add the MySQL include and Lib folders. My C:\Program files\mysql\mysql server 5.6\include and C:\Program files\mysql\mysql server 5.6\lib

Vi. Modification of Project properties: Connection-Add dependencies: Libmysql.lib and Ws2_32.lib

Vii. if MySQL is 64-bit, change the project to x64.

Well, so far, your mysql++ should be able to compile ....

mysql++ VS2013 Environment Configuration

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.