在Mac中安装boost_date_time
如何在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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MacPorts 在
/opt/local/include
和/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:
The bootstrap script is used to build
bjam
, the boost build tool. It's not necessary if you installed from MacPorts.