Build Dimov's simple Boost.Threads test without bjam...

Hi, I have used various boost-libraries before but now, when I am trying to build the simple Boost.Threads test application posted by Peter Dimov on this list the other day (http://tinyurl.com/aotq7), I am stuck :-( I copied and pasted Peter's code into an empty Win32-Console-project in my development environment - which happens to be VC++7.1... When trying to get the build through, I get the error: "Mixing a dll boost library with a static runtime is a really bad idea...". This message is probably more than enough for most experienced Boost and Windows developers to say - Oh yes, my stupid #¤*@£¤ I must of course do that and that too, to get the build through. However, poor me is left clueless. I have once built all of boost using bjam so I have two different boost_thread- vc71-mt-*.dlls and the corresponding lib-files within the boost/lib-folder. But I do not know how to set-up my project to first get the compile and then the link through. And I cannot find any helpful information in the Boost.Threads documentation?! Even Google didn't provide any help... So I'd be very glad for any help from you guys! Regards, Sam

On 4/25/05, Sam Ferland <cpp_boost@yahoo.com> wrote:
I have used various boost-libraries before but now, when I am trying to build the simple Boost.Threads test application posted by Peter Dimov on this list the other day (http://tinyurl.com/aotq7), I am stuck :-(
You need to set your Code Generation options to use the Multi-threaded runtime libraries: Project > Properties > C/C++ > Code Generation > Runtime Library Select either Multi-threaded Debug DLL or Multi-threaded DLL (and link with either the debug or non-debug Boost.Threads library as appropriate) -- Caleb Epstein caleb dot epstein at gmail dot com

Caleb Epstein <caleb.epstein@gmail.com> wrote:
You need to set your Code Generation options to use the Multi-threaded runtime libraries:
Project > Properties > C/C++ > Code Generation > Runtime Library
Select either Multi-threaded Debug DLL or Multi-threaded DLL (and link with either the debug or non-debug Boost.Threads library as appropriate)
Visual C++ .NET 2003 toolkit does not come with the IDE. And even if it does, it still does not come with dynamic CRT. It comes only with static one. Which makes it quite unusable when someone really needs dynamic CRT. But Visual C++ .NET 2003 product (sold as "Standard" and also part of Visual Studio) actually comes with dynamic runtime, which can be selected through project settings or using compiler command line option /MD (or /MDd if one needs debug symbols) B.

Sam Ferland wrote:
Hi,
I have used various boost-libraries before but now, when I am trying to build the simple Boost.Threads test application posted by Peter Dimov on this list the other day (http://tinyurl.com/aotq7), I am stuck :-(
I copied and pasted Peter's code into an empty Win32-Console-project in my development environment - which happens to be VC++7.1...
When trying to get the build through, I get the error: "Mixing a dll boost library with a static runtime is a really bad idea...".
You need to choose the Multithreaded DLL runtime from C/C++ | Code Generation.
participants (4)
-
Bronek Kozicki
-
Caleb Epstein
-
Peter Dimov
-
Sam Ferland