Boost logo

Boost Users :

Subject: Re: [Boost-users] Linking Error on WaitForSingleObject
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-12 10:46:16


AMDG

On 1/12/2011 7:40 AM, Igor R wrote:
>> 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.

WaitForSingleObject isn't in the CRT, it's in kernel32.dll.

In Christ,
Steven Watanabe


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