Why does C++ Boost distribution have `.dll`and `.lib` files?

Viewed 3189

Howdi folks. I'm currently in the process of creating a "shared" library (aka DLL on windows) which in turn would rely on "Boost C++" libraries for date time features. I have noticed that my Boost installation (done via Boostpro) has some DLL and LIB files in the lib directory of the boost installation. OK, I thought there were required so I added them to the library dependencies in my IDE.

Now what I do is write code which uses boost date time library, create a shared library and use it from a standalone executable. It works, even though I have just copied the shared library I created into the executable folder and not the boost_date_time-vc100-mt-1_47.dll file. Strange. Now what I do is remove the DLL/library dependency of Boost from my project and build the shared library. It still works.

I'm a bit confused. If the Boost libraries are really header only, why does my Boostpro installation have *.lib and *.dll files for datetime and other boost parts? Is there any scenario I'd want to use them given that those boost libraries anyways get compiled into my shared library?

Hope I was clear enough, please let me know if more clarifications are required. Also FWIW, I'm using Eclipse CDT + MingW for all this.

1 Answers
Related