[英]How to integrate boost thread(source files) into my own project
What I want is to put the source files about the boost thread(all necessary header and source files) into my own project so that other people don't need to configure the support of boost anymore. 我想要的是将关于boost线程的源文件(所有必需的头文件和源文件)放入我自己的项目中,以便其他人不再需要配置boost的支持。 The build system is made by CMake. 构建系统由CMake制作。
Recently I am trying to update the boost thread to the actual version 1.53, but the new version of boost thread cannot get built in windows.(it works under linux) 最近我试图将boost线程更新到实际版本1.53,但新版本的boost线程无法在windows中构建。(它在linux下工作)
What I do to integrate the boost thread is very simple, I just put all source files required by boost::thread in one folder (including the source files of boost::system) and make a DLL for all these source files. 我整合boost线程的工作非常简单,我只需将boost :: thread所需的所有源文件放在一个文件夹中(包括boost :: system的源文件),并为所有这些源文件制作一个DLL。 (with build option BOOST_THREAD_BUILD_DLL) (使用构建选项BOOST_THREAD_BUILD_DLL)
But when the built dll library above is linked to my own code, I got some unresolved reference errors to the boost::system like: 但是当上面构建的dll库链接到我自己的代码时,我得到一些未解决的引用错误到boost :: system,如:
"unresolved reference to error_category xxxx"
But the built library contains the source files from the boost::system, I have no idea why such error comes. 但是构建的库包含来自boost :: system的源文件,我不知道为什么会出现这样的错误。 Could you guys give me some hints? 你们能给我一些提示吗? thanks a lot, I have already spent quite time about this disgusting probem :( 非常感谢,我已经花了很多时间来讨论这个令人作呕的探测器:(
As Johannes pointed out in his comment, the BCP tool is designed to do exactly this: 正如约翰内斯在评论中指出的那样, BCP工具的目的是做到这一点:
The bcp utility is a tool for extracting subsets of Boost, it's useful for Boost authors who want to distribute their library separately from Boost, and for Boost users who want to distribute a subset of Boost with their application. bcp实用程序是一个用于提取Boost子集的工具,它对于希望与Boost分开分发其库的Boost作者以及希望将Boost子集与其应用程序一起分发的Boost用户非常有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.