简体   繁体   English

如何将特定的Boost库编译为DLL

[英]How to compile specific Boost libraries to a DLL

I am trying to embed the boost uuid package in my project. 我想在我的项目中嵌入boost uuid包。 For ease we would like to just include some DLLs, as we do with most libraries we use. 为了方便起见,我们想要包含一些DLL,就像我们使用的大多数库一样。 I can't figure out how to get just the DLLs for the uuid package (and any necessary dependencies). 我无法弄清楚如何获得uuid包的DLL(以及任何必要的依赖项)。 I have tried building normally, b2, bcp, and anything else I can find but all I get are copies of the source or DLLs for many of the libraries but not uuid, which is the only one I need. 我已经尝试正常构建,b2,bcp,以及我能找到的任何其他东西,但我得到的是许多库的源代码或DLL的副本,但不是uuid,这是我唯一需要的。

In case it makes a difference, this is for a windows application. 如果它有所不同,这适用于Windows应用程序。 We have lots of different developers with different environments and would really just like something (like a DLL but I'm open to other options) that we can include in our source control so everyone doesn't have to install boost and set it up the same way. 我们有很多不同的开发人员,他们有不同的环境,他们真的很喜欢我们可以包含在源代码控制中的东西(比如DLL,但我可以选择其他选项)所以每个人都不需要安装boost并设置它同样的方式。 Ideally we would also like just boost/uuid and any dependencies, not the whole gigantic library. 理想情况下,我们也想要boost / uuid和任何依赖项,而不是整个巨大的库。

Boost uuid, like many boost libraries, is header-only: you can't find any dll because there is no dll for this library. 与许多boost库一样,提升uuid只是标题:你找不到任何dll,因为这个库没有dll。 Just copy and include the headers where you need them. 只需复制并包含您需要它们的标题。

See the documentation . 请参阅文档

BCP can be used to extract uuid and its dependencies. BCP可用于提取uuid及其依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM