question about boost static library linking

maybe not a right board to ask boost questions. but it is quite intriguing for me and may be helpful to better understand c++ compiler.

when I link a static library, I do two things in my visual studio

1.
in Linker->General, add the pass to the lib files in Additional Library Directories

2. in Linker->Input
add the lib files in the Additional Dependencies

What amaze me in boost is that it seems the only thing I need to do is the first step. The studio will automatically look for the right library during the linking based my version of the studio. It would be nice if I can do the same thing for my own static libs. Wondering how can they do it?
Any explanation from experts :)?

Thanks
Afaik just a few boost libraries need extra linking. Most of them are header files only (due to template usage).

So there is no magic in it. But this should be written on the homepage too.

Maikel
actually, I refer the one which really need linking, as boost::thread. I am puzzled as I see compiler automatically pick up the right lib from the referred directories, when I did not include it in input. Not sure how they do it. For example,

libboost_thread-vc90-mt-sgd-1_42.lib

really do not know how compiler figure out to link this one. I am amazed but think I may missed some basic concepts or facts ...
probably some #pragma nested in a million #ifdefs magic/hell.
Topic archived. No new replies allowed.