在Mac中安装boost_date_time

发布于 2024-12-16 01:55:15 字数 440 浏览 2 评论 0原文

如何在Mac中安装boost_date_time?我使用macport来安装boost。但它没有安装date_time。然后我尝试使用从 boost 网站下载的二进制文件进行安装。使用

./bootstrap.sh --prefix=path/to/installation/prefix --with-libraries=library-name-list

但编译仍然失败

g++ -o test -g -O2  -I/usr/include/mysql test.cpp -lz  -lz  -L/usr/lib/mysql -lmysqlclient -lboost_date_time-mt >&5
ld: library not found for -lboost_date_time-mt

我做错了什么?

How do in install boost_date_time in mac? i used macport to install boost. But it did not install date_time. Then i tried installing using the binary downloaded from boost website. using

./bootstrap.sh --prefix=path/to/installation/prefix --with-libraries=library-name-list

but still the compilation fails

g++ -o test -g -O2  -I/usr/include/mysql test.cpp -lz  -lz  -L/usr/lib/mysql -lmysqlclient -lboost_date_time-mt >&5
ld: library not found for -lboost_date_time-mt

what am i doing wrong?

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

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

发布评论

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

评论(1

不即不离 2024-12-23 01:55:15

MacPorts 在 /opt/local/include/opt/local/lib 中安装标头和库。

因此,您需要添加以下参数:

-I/opt/local/include -L/opt/local/lib

bootstrap 脚本用于构建 boost 构建工具 bjam。如果您是从 MacPorts 安装的,则不需要。

MacPorts installs headers and libs in /opt/local/include and /opt/local/lib.

So, you would need to add the following parameters:

-I/opt/local/include -L/opt/local/lib

The bootstrap script is used to build bjam, the boost build tool. It's not necessary if you installed from MacPorts.

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