当前位置:首页 > 操作系统 > MacOs

XCode+Mac+MySQL版

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 4. Build Phases加入lib 5. 运

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

XCode+Mac+MySQL版 - 文章图片


4. Build Phases加入lib

XCode+Mac+MySQL版 - 文章图片

5. 运行


So, what’s the cleanest solution? Specifically, one that avoids having to alter everything you ever write, just to get around a (hopefully soon fixed) bug in the MySQL installation?

Do this:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib

In other words, create a link from /usr/local/mysql/lib (actual location) to /usr/lib (the place MySQL goes looking).


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐