angolero | 11 Nov 08:57

[Thread] visual studio hello word multithreading problem

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...
(Continue reading)

Vladimir Prus | 11 Nov 09:23
Favicon

Re: [Thread] visual studio hello word multithreading problem

angolero <at> linux.ajusco.upn.mx 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...
(Continue reading)


Gmane