建设提升了Windows的一个子集 [英] Building a subset of boost in windows

查看:83
本文介绍了建设提升了Windows的一个子集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置提升的一个子集,并把它使用的bjam正确的编译,但是我没有收到我在寻找的结果。我正在使用升压1.37.0窗口。

I'm trying setup a subset of boost and get it properly compiled using bjam, however I'm not getting the result I'm looking for. I'm working on windows using boost 1.37.0.

比方说,我想要的库smart_ptr和文件系统内置/安装。我有意选择只有库和一个库需要编译库的标题。我希望他们能够建成一个类似于如果我建立了一个完整的升压装置用的bjam我会得到(即不指定任何--with-libraryX)的目录结构,但不当然所有的图书馆,我不感兴趣

Let's say I want the libraries smart_ptr and filesystem built/installed. I intentionally chose a header only library and one library needing to compile a library. I want them to be built into a directory structure similar to the one I would get if I built a complete boost installation with bjam (i.e not specifying any --with-libraryX) but of course without all the libraries I'm not interested in.

我的第一个方法是使用--with文件系统--with-smart_ptr在bjam的,但它似乎不承认smart_ptr(我试过的SmartPtr和智能PTR没有成功)。我想这是因为它是一个仅有头库。

My first approach was to use the --with-filesystem --with-smart_ptr in bjam, however it seemed like it didn't recognize smart_ptr (I tried smartptr and smart-ptr without success). I guess this is because it's a header only library.

当我删除它,只有--with的文件系统,似乎所有的库头文件复制到安装路径,只建库文件系统。图书馆建筑的行为是一个我希望的,但我得到了图书馆,我不感兴趣,安装在我的提振目录吨的头文件。

When I removed it and only had --with-filesystem it seemed to copy ALL libraries header files to the install path and only build the libraries for filesystem. The library building behavior was the one I hoped for, but I got tons of header files for libraries I'm not interested in installed in my boost directory.

我的第二个方法是使用bcp复制有关的项目。但这并在这个意义上,我只得到了我关心的项目(和它们的依赖)锻炼。不过,他们没有提供任何文件,使建筑在被复制库。这意味着我需要安装项目文件对于所有这些不仅是标题和手动构建它们的库。

My second approach was to use bcp to copy the relevant projects. This did work out in the sense that I only got the projects I cared about (and their dependencies). However they didn't provide any make files for building the libraries that was copied. This means I would need to setup projects files for all the libraries that are not header only and manually build them.

所以我的问题基本上是有选择性地建设提升的方式,只复制标题为我感兴趣的,只有建立库文件对于非唯一的标题我感兴趣的库库(和升压它们依赖于课程库)?

So my question is basically, is there a way of selectively building boost that only copies the headers for the libraries I'm interested in and only building library files for the non header only libraries I'm interested in (and the boost libraries they are dependent on course)?

有可能吨本手册/脚本基础的解决方案,但如果我能得到的东西只能用的bjam将是对我的方式更有用的运行,因为增加新的库或升级到一个新的动力版本将是非常简单的。

There are probably tons of manual/scripting based solutions for this, but if I could get something running only using bjam would be way more useful for me since adding new libraries or upgrading to a new boost version would be very simple.

编辑:
添加了完整的命令行的第一种方法:

Added the complete command line for the first approach:

bjam install --prefix=c:\temp\boostsmall 
   --build-dir=C:\temp\boostsmalltemp --layout=system 
   --with-filesystem variant=debug link=static threading=multi
   runtime-link=static

改的scoped_ptr到smart_ptr

Changed scoped_ptr to smart_ptr

推荐答案

解决了这个问题。

将BCP解决方案必须使文件的项目,但我需要复制的工具目录和升压目录我复制了我所有的库得到的东西运行起来的地方的根。

The bcp solution had make files for the projects, however I needed to copy the tools directory and the root of the boost directory to the place I copied all my libs to get things up running.

这篇关于建设提升了Windows的一个子集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆