码迷,mamicode.com
首页 > 数据库 > 详细

Mac os 上用C++进行MYSQL开发配置

时间:2016-04-27 12:38:07      阅读:1586      评论:0      收藏:0      [点我收藏+]

标签:

下载boost: 

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

安装boost:

  解压安装 

./bootstrap.sh
./b2
./b2 install

 

下载C++ Connector for mac

Select Platform:中选择 Source code下载, 否则编译不成功.

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

cd mysql-connector-c++-1.1.7
cmake .
make clean
make
make install

 

在xcode中进行项目配置

3.项目配置

3.1 Header Search Paths

  /usr/local/include

  /usr/local/mysql/include

 

3.2 Library Search Paths

  /usr/local/lib

  /usr/local/mysql/lib

 

3.1 Other Linker Flags

  -lmysqlcppconn -lm -lmysqlclient -lz

 

 

 

 

 

 

参考: 

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

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

Mac os 上用C++进行MYSQL开发配置

标签:

原文地址:http://www.cnblogs.com/laohehexiaohe/p/5436295.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!