|
Boost Users : |
Subject: Re: [Boost-users] boost::disable_interruption problem
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-05-10 04:30:55
On Fri, 10 May 2013 00:29:28 -0700, Mohammad Daei <modaei_at_[hidden]> wrote:
<snip>
> I tried this and finally it worked: "gcc example.cpp -o example -L
> /root/boost_1_53_0/stage/lib/ -lboost_thread -lboost_system"
>
> I added the "/root/boost_1_53_0/stage/lib/" to Eclipse "Library Paths" on
> the project properties under the "C/C++ General" section and also added
> "boost_thread", "boost_system" , "boost_regex" and "boost_date_time" to
> "Libraries" on the same section. after building and compiling the
> undefined
> reference error for "boost::this_thread::disable_interruption" was
> removed
> but I received two new errors. one of them is:
> /usr/include/boost/thread/detail/thread.hpp:191:
> undefined
> reference to `boost::thread::start_thread()'
>
> and the other is:
>
> /root/workspace/AMI2/Debug/../src/manager/ManagerEventsHandler.cpp:46:
> undefined reference to `boost::thread::~thread()'
> in the following piece of code:
> #include <boost/thread.hpp>
> #include <boost/bind.hpp>
> #include <string.h>
> void ManagerEventsHandler::fireEvent(const ManagerEvent&
> me) {
> boost::thread
> t(boost::bind(&ManagerEventsHandler::internalFireEvent, this, me));
> }
>
> Given that I have included "boost/thread.hpp" in the source code and
> included the boost::thread library path and binaries in the project, what
> else should I do?
>
> Mostafa I reviewed compiler options and I think I'm using them correctly.
> are there any flaws?
> Nat thanks for the link. it was very helpful.
At this point you have to do a process of elimination on your end to see
why ManagerEventsHandler.cpp fails and example.cpp works. Have you tried
building example.cpp stand-alone in Eclipse? I don't know what example.cpp
is nor do I have a minimal and complete picture of the
ManagerEventsHandler.cpp project, hence I can't think of anything more to
help you.
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