Hi,
Yes boost and qt disagree on the definition of signal which is unfortunate (especially as Qt does not namespace their signal definition). In some cases I have had to undefine it and then redefine it when dealing with Qt UI's

Toby

On 28/11/2007, Renaud Barate <renaud.barate@ensta.fr> wrote:

Hello,

I've just had a very similar problem with player 2.0.4 and boost. It seems
that the source of it was a conflict between boost and another library (for
me it was QT 4). I've been able to solve it by changing the order of the
includes.

To be short:
#include <libplayerc++/playerc++.h>
#include <QImage>
-> No compilation problem

#include <QImage>
#include <libplayerc++/playerc++.h>
-> Fails with a lot of unhelpful compiler errors

Maybe the problem is the same for you. Can you check / post your file
"DustBotIncludes.h" ?
Hope this helps.

Renaud



AASS wrote:
>
>
>> >>>> I had a simulation program running well using the CVS version of
>> >>>> player/stage. Then i installed the boost libraries, after
>> which I get
>> >>>> the
>> >>>> following error during compilation:
>> >>>>
>> >>>> ************* Start of error message ********************
>> >>>> g++ -Wall -c robot.cc -o robot.o `pkg-config --cflags playerc++`
>> >>>> /usr/include/boost/noncopyable.hpp: In copy constructor
>> >>>> 'boost::mutex::mutex(const boost::mutex&)':
>> >>>> /usr/include/boost/noncopyable.hpp:27: error:
>> >>>> 'boost::noncopyable_::noncopyable::noncopyable(const
>> >>>> boost::noncopyable_::noncopyable&)' is private
>> >>>> /usr/include/boost/thread/mutex.hpp:35: error: within this
>> context
>> >>>> /usr/local/include/player- 2.1/libplayerc++/playerclient.h: In
>> copy
>> >>>> constructor 'PlayerCc::PlayerClient::PlayerClient(const
>> >>>> PlayerCc::PlayerClient&)':
>> >>>> /usr/local/include/player- 2.1/libplayerc++/playerclient.h:
>> 104: note:
>> >>>> synthesized method 'boost::mutex::mutex(const boost::mutex&)'
>> first
>> >>>> required
>> >>>> here
>> >>>> robot.cc: In member function 'PlayerCc::PlayerClient
>> >>>> Robot::createPlayerClient(std::string, int)':
>> >>>> robot.cc:9: note: synthesized method
>> >>>> 'PlayerCc::PlayerClient::PlayerClient(const
>> PlayerCc::PlayerClient&)'
>> >>>> first
>> >>>> required here
>> >>>> /usr/include/boost/noncopyable.hpp: In copy constructor
>> >>>> 'boost::signals::detail::signal_base::signal_base(const
>> >>>> boost::signals::detail::signal_base&)':
>> >>>> /usr/include/boost/noncopyable.hpp:27: error:
>> >>>> 'boost::noncopyable_::noncopyable::noncopyable(const
>> >>>> boost::noncopyable_::noncopyable&)' is private
>> >>>> /usr/include/boost/signals/detail/signal_base.hpp:119: error:
>> within
>> >>>> this
>> >>>> context
>> >>>> /usr/include/boost/signals/signal_template.hpp: In copy
>> constructor
>> >>>> 'boost::signal0<void, boost::last_value<void>, int,
>> std::less<int>,
>> >>>> boost::function<void ()(), std::allocator<void> > >::signal0
>> (const
>> >>>> boost::signal0<void, boost::last_value<void>, int,
>> std::less<int>,
>> >>>> boost::function<void ()(), std::allocator<void> > >&)':
>> >>>> /usr/include/boost/signals/signal_template.hpp:142: note:
>> synthesized
>> >>>> method
>> >>>> 'boost::signals::detail::signal_base::signal_base(const
>> >>>> boost::signals::detail::signal_base&)' first required here
>> >>>> /usr/include/boost/signal.hpp: In copy constructor
>> 'boost::signal<void
>> >>>> ()(),
>> >>>> boost::last_value<void>, int, std::less<int>,
>> boost::function<void
>> >>>> ()(),
>> >>>> std::allocator<void> > >::signal(const boost::signal<void ()(),
>> >>>> boost::last_value<void>, int, std::less<int>,
>> boost::function<void
>> >>>> ()(),
>> >>>> std::allocator<void> > >&)':
>> >>>> /usr/include/boost/signal.hpp:335: note: synthesized method
>> >>>> 'boost::signal0<void, boost::last_value<void>, int,
>> std::less<int>,
>> >>>> boost::function<void ()(), std::allocator<void> > >::signal0
>> (const
>> >>>> boost::signal0<void, boost::last_value<void>, int,
>> std::less<int>,
>> >>>> boost::function<void ()(), std::allocator<void> > >&)' first
>> required
>> >>>> here
>> >>>> /usr/local/include/player-2.1/libplayerc++/clientproxy.h: In copy
>> >>>> constructor 'PlayerCc::ClientProxy::ClientProxy(const
>> >>>> PlayerCc::ClientProxy&)':
>> >>>> /usr/local/include/player-2.1/libplayerc++/clientproxy.h:67:
>> note:
>> >>>> synthesized method 'boost::signal<void ()(),
>> boost::last_value<void>,
>> >>>> int,
>> >>>> std::less<int>, boost::function<void ()(), std::allocator<void> >
>> >>>>
>> >>>>
>> >>>>> ::signal(const boost::signal<void ()(),
>> boost::last_value<void>, int,
>> >>>>>
>> >>>>>
>> >>>> std::less<int>, boost::function<void ()(),
>> std::allocator<void> > >&)'
>> >>>> first
>> >>>> required here
>> >>>> /usr/local/include/player-2.1/libplayerc++/playerc++.h: In copy
>> >>>> constructor
>> >>>> 'PlayerCc::MapProxy::MapProxy(const PlayerCc::MapProxy&)':
>> >>>> /usr/local/include/player-2.1/libplayerc++/playerc++.h:1300:
>> note:
>> >>>> synthesized method 'PlayerCc::ClientProxy::ClientProxy(const
>> >>>> PlayerCc::ClientProxy&)' first required here
>> >>>> robot.cc: In member function 'PlayerCc::MapProxy
>> >>>> Robot::createMapProxy(PlayerCc::PlayerClient*, int)':
>> >>>> robot.cc:15: note: synthesized method
>> >>>> 'PlayerCc::MapProxy::MapProxy(const
>> >>>> PlayerCc::MapProxy&)' first required here
>> >>>> make: *** [classes] Error 1
>> >>>> ************* End of error message ********************
>> >>>>
>> >>>> This is the code I am attempting to compile:
>> >>>>
>> >>>> ************* Start of code ********************
>> >>>> #include " robot.h"
>> >>>>
>> >>>> Robot::Robot() {}
>> >>>> Robot::~Robot() {}
>> >>>>
>> >>>> PlayerClient Robot::createPlayerClient(string hostname, int
>> portNumber)
>> >>>> {
>> >>>>    PlayerClient robot(hostname, portNumber);
>> >>>>    return robot;
>> >>>> }
>> >>>>
>> >>>> MapProxy Robot::createMapProxy(PlayerClient* robot, int
>> providesIndex)
>> >>>> {
>> >>>>    MapProxy proxy(robot, providesIndex);
>> >>>>    return proxy;
>> >>>> }
>> >>>>
>> >>>> OpaqueProxy Robot::createOpaqueProxy(PlayerClient* robot, int
>> >>>> providesIndex)
>> >>>> {
>> >>>>    OpaqueProxy proxy(robot, providesIndex);
>> >>>>    return proxy;
>> >>>> }
>> >>>>
>> >>>> LaserProxy Robot::createLaserProxy(PlayerClient* robot, int
>> >>>> providesIndex)
>> >>>> {
>> >>>>    LaserProxy proxy(robot, providesIndex);
>> >>>>    return proxy;
>> >>>> }
>> >>>>
>> >>>> Position2dProxy Robot::createPosition2DProxy(PlayerClient*
>> robot, int
>> >>>> providesIndex)
>> >>>> {
>> >>>>    Position2dProxy proxy(robot, providesIndex);
>> >>>>    return proxy;
>> >>>> }
>> >>>> ************* End of code ********************
>
>

--
View this message in context: http://www.nabble.com/Program-doesn%27t-compile-after-installing-boost-tf4820430.html#a13989624
Sent from the playerstage-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
This email is intended for the addressee only and may contain privileged and/or confidential information