MSVC has a pragma-statement which causes the linker to atomatically link the lib. Boost Test (as well as other boost libs, which are not only header based) make use of this feature. Dependent on retrieved compiler settings they calculate the name of the library to be linked and pass it to the pragma-statement smth. like:

#pragma comment(lib, "lib-boost-test-whatever")

This causes the linker to atomatically link that library, the only prerequisite is that it needs to find the path, where this lib can be located. That's why you need to set Library Search Directory for VC. Additioanlly, you can set this path globally in VC or locally only project based. I usually do it locally and use the BOOST_ROOT environment variable. That allows me to change the envvar and switch the path without changing the VC project file (which might be under source control).



Regards,
Ovanes
  

On Thu, Dec 10, 2009 at 2:44 PM, Andrew J. Leer <leeand00@hotmail.com> wrote:
Right.  I added it using the selected answer here:
However...I wasn't entirely sure if what I was doing was the
autolinking that you spoke of, and that sir it what I wanted to ask
you about.

Thanks again Steve,
    Andrew J. Leer

On Wed, Dec 9, 2009 at 5:57 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
> AMDG
>
> Andrew J. Leer wrote:
>>
>> Eh,
>>
>> What's auto linking?
>>
>
> Notice your original error:
>
> 1>Linking...
> 1>LINK : fatal error LNK1104: cannot open file
> 'libboost_unit_test_framework-vc80-mt-gd-1_40.lib'
>
>
> The Boost.Test library has already told the compiler that it needs
> this library.  You just need to add the directory containing it to
> the linker's search path.
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users