Boost logo

Boost Users :

Subject: Re: [Boost-users] boost:thread compiling problem
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-08-20 20:08:31


AMDG

Shaolin wrote:
> I am try to create a thread with boost but eveytime I execute I get some
> freaky error messages. See code below followed by error msg:
>
> #include <boost/thread/thread.hpp>
> #include <iostream>
> using namespace std;
>
> void hello()
> {
> cout << "hello" << endl;
> }
>
> int main(int argc, char* argv[])
> {
> boost::thread thrd1(&hello); // ERROR caused by the &hello param
> thrd1.join();
>
> }
>

You need to link to the thread library.
Please read the getting started guide.

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