Question

I have used Boost library (particularly, Boost filesystem) for my project in Visual Studio C++ (9.0 version). This Boost library is installed in C drive. My project is already finished, therefore, I have corresponding Debug and Release.

Now, I want to include particular DLLs of Boost filesystem to Debug and Release, so my first question is which DLLs do I need to copy? It shows many DLLs for filesystem. Ones which I tried are "boost_filesystem-vc90-mt-1_40.dll" and "boost_filesystem-vc90-mt-gd-1_40.dll". Since, I got an idea from the "vc90", I think it means for Visual Studio 9.0?

Second question, even if I don't include these Boost filesystem DLLs to Debug or Release, my EXE file of the project is still working? Can anyone please explain why is this happening? I tried to check if I have Boost Library path somehow in my Environment Variables, but, unfortunately I could not find them there. Thanks a lot.

P.S.: I am a beginner in both C++ and Boost. And, another library that I am using is OpenCV, for which I already copied corresponding DLLs (core, highgui and imgproc) to Debug and Release and this one is working perfectly.

Was it helpful?

Solution

You have 2 options:

a. Deploy Boost DLLs together with your binary. Answering your question - of course if your project depends on Boost, the libraries are required at runtime, your binary will not start without them.

If you deploy Release configuration of your project, then you need boost_filesystem-vc90-mt-1_40.dll library. In general you can just see all the dependencies of your binary using Dependency Walker tool.

b. Link Boost libraries statically, in this case your binary will not have runtime dependency on Boost DLLs, so you don't have to deploy them

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top