shared_ptr/weak_ptr compile error
I'd appreciate it if someone could tell me how to debug the error I'm getting. I've got a class with a member function like this: bool Instruction::button_press(GdkEventButton *, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>); =========================================================================== Instruction.C: In member function `bool Instruction::button_press(GdkEventButton*, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>)': Instruction.C:138: error: `top' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>' Instruction.C:138: error: `left' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>' Instruction.C:138: error: `right' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>' Instruction.C:138: error: `bottom' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>' =========================================================================== Thanks, Rob
Rob Benton wrote:
I'd appreciate it if someone could tell me how to debug the error I'm getting. I've got a class with a member function like this:
bool Instruction::button_press(GdkEventButton *, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>);
=========================================================================== Instruction.C: In member function `bool Instruction::button_press(GdkEventButton*, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>)': Instruction.C:138: error: `top' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>'
Have you included boost/weak_ptr.hpp?
Peter Dimov wrote:
Rob Benton wrote:
I'd appreciate it if someone could tell me how to debug the error I'm getting. I've got a class with a member function like this:
bool Instruction::button_press(GdkEventButton *, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>);
===========================================================================
Instruction.C: In member function `bool Instruction::button_press(GdkEventButton*, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>, boost::weak_ptr<Instruction>)': Instruction.C:138: error: `top' has incomplete type /usr/include/boost/shared_ptr.hpp:43: error: declaration of `struct boost::weak_ptr<Instruction>'
Have you included boost/weak_ptr.hpp?
I can't believe I posted on this list because I was missing an include file. Thank you for reminding me I am an idiot. :)
participants (2)
-
Peter Dimov
-
Rob Benton