下载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.7cmake .make cleanmake 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
时间: 2024-11-08 05:12:25