MySQL development configuration on Mac OS with C + +

Source: Internet
Author: User

Download boost:

Https://sourceforge.net/projects/boost/?source=typ_redirect

Install boost:

Unzip the installation

./bootstrap. SH . /b2
./B2 Install

Download C + + Connector for Mac

Select Platform: Choose Source Code Download, otherwise the compilation is unsuccessful.

http://dev.mysql.com/downloads/connector/cpp/

CD mysql-connector-c++-1.1. 7
CMake.
Make clean

Make install

Project configuration in Xcode

3. Project configuration

3.1 Header Search Paths plus

/usr/local/include

/usr/local/mysql/include

3.2 Library Search Paths plus

/usr/local/lib

/usr/local/mysql/lib

3.1 Other Linker Flags plus

-lmysqlcppconn-lm-lmysqlclient-lz

Reference:

http://blog.csdn.net/abcjennifer/article/details/16983929

Http://www.cnblogs.com/lchb/articles/3510082.html

Using C + + for MySQL development configuration on Mac OS

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.