如何在Mac OS X上安装MySQL Connector / C? [英] How to install MySQL Connector/C on Mac OS X?

查看:1204
本文介绍了如何在Mac OS X上安装MySQL Connector / C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C语言编写的应用程序,需要MySQL的互动,所以我下载的连接器/ C存档从官方网站,它包含斌,lib和包括文件夹,但我不知道在哪里安装它们。
我可以复制包含文件到我的项目文件夹,但我在这里可以把库文件,使我的编译的二进制(和其他二进制文件)可以找到它?

I'm writing an app in C that requires MySQL interaction, so I downloaded the Connector/C archive from the official website, and it contains bin, lib and include folders, but I don't know where to install them. I could copy the include files into my project folder, but where can I put the lib file so that my compiled binary (and other binaries) can find it?

在此先感谢!

推荐答案

这是令人困惑,是不是..不知道他们为什么不使这更清楚。

This is confusing, isn't it.. don't know why they don't make this more clear.

注意:lib /文件走在/ usr / local / lib目录
包含/文件走在/ usr /本地/包括
的bin /文件走在/ usr / local / bin目录

The lib/ files go in /usr/local/lib The include/ files go in /usr/local/include The bin/ files go in /usr/local/bin

在/ usr / ..目录是不可见的取景器通过AFAIK所以你必须通过命令行去它。祝您好运。

The /usr/.. directory isn't visible through finder afaik so you have to go at it via commandline. Best of luck

另外,在你的X code项目,确保你前往你的目标的设置,常规,然后添加链接库libmysqlclient.dylib

Also, in your Xcode project, make sure you add a Linked Library by going to your Target's settings, General, then adding Linked Library "libmysqlclient.dylib"

这篇关于如何在Mac OS X上安装MySQL Connector / C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆