下载boost: https://sourceforge.net/projects/boost/?source=typ_redirect 安装boost: 解压安装 ./bootstrap.sh ./b2 ./b2 install 在github下载安装mysql-connector-cpp: git clone https://github.com/mysql/mysql-connector-cpp cd mysql-connector-cpp/ 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://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source-distribution.html http://blog.csdn.net/abcjennifer/article/details/16983929 http://www.cnblogs.com/lchb/articles/3510082.html
Category: C++
Xcode + yaml-cpp 开发配置
下载安装: yams-cpp release 0.5.3, 支持 yaml 1.2标准, 比老版本语法更优雅 https://github.com/jbeder/yaml-cpp 解压至yaml-cpp-release-0.5.3 复制代码 cd yaml-cpp-release-0.5.3 mkdir build cd build cmake .. make make install 复制代码 确认include文件安装到/usr/local/include中,文件夹为 yaml-cpp 创建测试文件: main.cpp内容如下 复制代码 #include #include #include <yaml-cpp/yaml.h> #include int main(int argc, const char * argv[]) { // insert code here… YAML::Node config = YAML::LoadFile(“config.yaml”); const std::string username = config[“username”].as(); const…