Installing boost_date_time in mac

Installing boost_date_time in mac

本文关键字:in mac time date boost Installing      更新时间:2023-10-16

如何在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

我做错了什么?

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

因此,您需要添加以下参数:
-I/opt/local/include -L/opt/local/lib

bootstrap脚本用于构建bjam (boost构建工具)。