本文介绍了小牛升级后找不到 -lmysqlclient 的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我在 Lion 上运行 MySQL C API 已经有一段时间了,现在刚刚升级到 10.9.3 Mavericks.当我构建我的项目时,XCode 说构建成功"但随后它会遇到0 dyld_fatal_error"并显示消息dyld:库未加载:libmysqlclient.18.dylib"……原因:找不到图像.

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."

事实上,libmysqlclient.18.dylib 仍然在它一直在的/usr/local/mysql/lib/目录中.除了升级到小牛队之外,什么都没有改变.XCode 的构建设置也相同:(标题搜索路径:/usr/local/mysql/include;库搜索路径:/usr/local/mysql/lib;其他链接器标志:-lmysqlclient -lm -lz).

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.

推荐答案

找到答案:

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

这对于 Lion 来说不是必需的,但(至少对我而言)对于 Mavericks 来说是必需的.

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

这篇关于小牛升级后找不到 -lmysqlclient 的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:25