Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Using thread accross libraries
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2013-11-28 09:34:26


2013/11/26 Sébastien Gallou <sebastien.gallou_at_[hidden]>
<...>

> Trying to debug into Boost, I'm seeing that in the interruptible_wait
> function, the test "if(detail::get_current_thread_data() &&
> detail::get_current_thread_data()->interruption_enabled)" doesn't give the
> same result if code is in DLL (test result is false) or in the main (true).
>

Looks like TestBoostThread.cpp and Dll.cpp are compiled with different
runtime libraries.

Make sure that in properties of each project values of "Configuration
Properties"->"C/C++"->"Code Generation"->"Runtime library" are equal. Also
make sure that they are set to use DLLs ("Multi-threaded Debug DLL" or
"Multi-threaded DLL").

Without that you'll be getting really strange errors all around your
binaries, because memory allocated in one binary/dll won't be correctly
handled in another dll/binary.

-- 
Best regards,
Antony Polukhin


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