Library not found for -lmysqlclient after Mavericks upgrade

一笑奈何 提交于 2019-12-25 12:49:10

问题


I have been running the MySQL C API on Lion for some time and now just upgraded to 10.9.3 Mavericks. When I build my project, XCode says “Build succeeded” but then it suffers a “0 dyld_fatal_error” with the message “dyld: Library not loaded: libmysqlclient.18.dylib” … Reason: image not found.”

In fact, libmysqlclient.18.dylib is still in the /usr/local/mysql/lib/ directory where it always was. Nothing has changed but the upgrade to Mavericks. XCode’s build settings also are the same: (Header Search Paths: /usr/local/mysql/include; Library Search Paths: /usr/local/mysql/lib; Other Linker Flags: -lmysqlclient -lm -lz).

Why would this be happening? Thanks for any suggestions.


回答1:


Answer found:

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

This wasn't necessary with Lion, but (for me at least) it is with Mavericks.



来源:https://stackoverflow.com/questions/23717589/library-not-found-for-lmysqlclient-after-mavericks-upgrade

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!