Boost logo

Boost-Build :

Subject: Re: [Boost-build] [Thread] visual studio hello word multithreading problem
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-11-11 03:23:49


angolero_at_[hidden] wrote:

> Dear boost community.
>
> I want to use boost thread library in Windows with visual studio 8.
>
> So I download the boost_1_36_0_setup.exe, and select all the
> multithreading options for visual c++ 8 (visual studio 2005), this
> download and install a boost directory with different header files and lib
> and dll files.
> Then create a project with this code, a hello word multithreading code:
>
> #include <boost/thread/thread.hpp>
> #include <iostream>
>
> void hello(){
> std::cout << "Hello world, I'm a thread!" << std::endl;
> }
>
> int main(int argc, char* argv[]){
> boost::thread thrd(&hello);
> thrd.join();
> return 0;
> }
>
> And build the project, but in the linking part of the building process
> some error pop out.
> This is the error:
>
>>Compiling...
>>main.cpp
>>Linking...
>>LINK : fatal error LNK1104: cannot open file
> 'libboost_thread-vc80-mt-1_36.lib'
>
> Of course I check the linker include path, and set the specific file path
> there, but still the problem persist.

Is a file by that name actually present? I believe this name means "static release MT",
and I have no idea if installer includes that. Defining BOOST_ALL_DYN_LINK preprocessor
symbol in project properties will cause "shared release MT" to be used, which is something
that I'd surely expect to be present.

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk