Boost logo

Boost Users :

Subject: Re: [Boost-users] Linking Error on WaitForSingleObject
From: Igor R (boost.lists_at_[hidden])
Date: 2011-01-12 10:40:21


> ERROR: error LNK2019: unresolved external symbol
> __imp__WaitForSingleObject__USE_VCR_MODE_at_8 referenced in function
> "public: void __thiscall boost::detail::basic_timed_mutex::lock(void)"
> (?lock_at_basic_timed_mutex_at_detail@boost@@QAEXXZ)
>
> I am using Visual Studio 2010 and boost 1_45_0. The code is linking to
> libboost_thread-vc100-mt-s-1_45.lib in both the projects.

Maybe I'm mistaken, but it seems to me that CRT linkages of boost and
your application do not match:
libboost_thread-vc100-mt-s-1_45.lib -- uses static CRT
__imp__WaitForSingleObject -- looks like you use /MD option in your
code-generation settings, i.e. link CRT dynamically. Try to change
this option to /MT.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net