macos 如何在 OSX 中安装 boost c++ 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5797443/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install boost c++ libraries in OSX
提问by node ninja
I downloaded boostjam and put it in with the install files and tried to run it, the following error is displayed:
我下载了 boostjam 并将其与安装文件一起放入并尝试运行它,显示以下错误:
error: error: no Jamfile in current directory found, and no target references specified.
错误:错误:在当前目录中未找到 Jamfile,并且未指定目标引用。
回答by ManuelSchneid3r
回答by Ferruccio
回答by ?? Tiib
Did you download boost archive and unpack it? Why you downloaded bjam? What install files? Bootstrap can compile bjam on your computer. Short story howto install:
您是否下载了 boost 存档并解压缩了它?你为什么下载bjam?什么安装文件?Bootstrap 可以在您的计算机上编译 bjam。小故事如何安装:
- Unpack the boost archive to desktop
- Navigate with terminal to boost directory (its something like /users/zbuffer/desktop/boost_1_46_1)
- type:
- ./bootstrap.sh
- pay attention to error messages
- if bootstrap may not execute and you need to allow it before:
- chmod +x bootstrap.sh
- if bootstrap worked type:
- ./bjam architecture=combined
- pay attention to error messages
- 将 boost 存档解压到桌面
- 使用终端导航到 boost 目录(类似于 /users/zbuffer/desktop/boost_1_46_1)
- 类型:
- ./bootstrap.sh
- 注意错误信息
- 如果引导程序可能无法执行并且您需要在此之前允许它:
- chmod +x bootstrap.sh
- 如果引导程序工作类型:
- ./bjam 架构=组合
- 注意错误信息
If something is still wrong and you come back to ask here around then please write what exactly you did and at what step what happened.
如果还是有问题,你回来问周围,那么请写下你到底做了什么,在哪一步发生了什么。
回答by dubnde
回答by user1823890
In order to avoid troubles compiling third party libraries that need boost installed in your system, run this:
为了避免编译需要在系统中安装 boost 的第三方库的麻烦,请运行以下命令:
sudo port install boost +universal