简体   繁体   English

使用Boost库的dll版本

[英]Using boost library's dll version

I followed the start-up guide in boost library and was able to use the library in a static-linked form, ie, use .lib version of library files. 我遵循了boost库中的入门指南,并且能够以静态链接的形式使用该库,即使用库文件的.lib版本。 I did this just by adding the path to the library to Additional Library Directories in Visual Studio 2010. 我只是通过将库的路径添加到Visual Studio 2010中的“其他库目录”中来完成此操作的。

I am wondering how I can use the DLL version of the library. 我想知道如何使用该库的DLL版本。 In Visual Studio, everything seems quite automated. 在Visual Studio中,一切似乎都非常自动化。 Is there any simple configuration allows me to do that? 有什么简单的配置可以让我做到这一点吗? Or do I need to change my code? 还是我需要更改代码? Maybe add some macro? 也许添加一些宏?

Thanks 谢谢

First google result How to link to dynamic boost libs? Google的第一个结果如何链接到动态Boost库?

Put in stdafx.h or as a project settings define: 放入stdafx.h或作为项目设置定义:

#define BOOST_ALL_DYN_LINK

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

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