对 OS X 上安装的 Berkeley db C api 有很好的介绍吗?

发布于 2024-10-31 14:54:44 字数 662 浏览 3 评论 0原文

我正在寻找关于 OS X 上安装的 Berkeley db api 的良好介绍。我查看了此 Oracle 文档:http://download.oracle.com/docs/cd/E17076_02/html/gsg/C/BerkeleyDB-Core-C-GSG .pdf

这似乎是较新的版本。我无法编译它并收到以下错误:

test.c:23: error: ‘DB_CREATE’ undeclared (first use in this function)
test.c:23: error: (Each undeclared identifier is reported only once
test.c:23: error: for each function it appears in.)
test.c:26: error: ‘DB’ has no member named ‘open’
test.c:42: error: too many arguments to function ‘dbp->close’

据我所知,OS X 上安装的版本是旧的 BSD 许可 1.85。

I'm looking for a good introduction to the Berkeley db api that is installed on OS X. I have looked at this Oracle document: http://download.oracle.com/docs/cd/E17076_02/html/gsg/C/BerkeleyDB-Core-C-GSG.pdf

Which seems to be a newer version. I am not able to compile this and get the following error:

test.c:23: error: ‘DB_CREATE’ undeclared (first use in this function)
test.c:23: error: (Each undeclared identifier is reported only once
test.c:23: error: for each function it appears in.)
test.c:26: error: ‘DB’ has no member named ‘open’
test.c:42: error: too many arguments to function ‘dbp->close’

AFAIK, the version installed on OS X is the old BSD licensed 1.85.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

維他命╮ 2024-11-07 14:54:44

DB 1.85 仅支持某些系统配置文件,例如 /etc/pwd.db,因此不应该真正使用它。

话虽这么说,它比较新的 Berkeley DB 版本简单得多。 dbopen(3) 是一个好的开始。

DB 1.85 is only there to support some system configuration files such as /etc/pwd.db, so it shouldn't really be used.

That being said, it is much simpler than the newer Berkeley DB releases. dbopen(3) is a good start.

最近可好 2024-11-07 14:54:44

我在苹果的支持网站上进行了快速搜索。看起来 Mac OS X 上可能安装了 Berkeley DB 的更新版本。我发现 Berkeley DB 4.2 安装在 Mac OS X Server v10.5 上并在 Open Directory Server 中使用。

I did a quick search on Apple's support site. It looks like there are probably more recent releases of Berkeley DB installed on Mac OS X. I found that Berkeley DB 4.2 is installed on Mac OS X Server v10.5 and used in the Open Directory Server.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文