|
Boost Users : |
Subject: Re: [Boost-users] boost:thread compiling problem
From: Shaolin (shaolinfinest_at_[hidden])
Date: 2009-08-21 12:03:05
Ok, I have managed to compile and install the libs but I dont know how to
include it in the commandline. The regex example works fine but how do I do
it for thread ?
$ c++ -I *path/to/*boost_1_39_0 example.cpp -o example *\*
*~/boost/stage/lib/libboost_regex-gcc34-mt-d-1_36.a*
2009/8/21 James C. Sutherland <James.Sutherland_at_[hidden]>
>
> On Aug 20, 2009, at 6:47 PM, Shaolin wrote:
>
> I have read the *getting started* section and its confused me even more.
>
> Read it again ;-)
>
> boost::thread is a compiled library that you must link against. Be sure
> that you have compiled and installed the library, and that you are including
> the appropriate link command.
>
>
> 2009/8/21 Steven Watanabe <watanabesj_at_[hidden]>
>
>> 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 mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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