[ptr_container] linker error
::static_move_ptr
> >,struct boost::heap_clone_allocator>::null_clone_allocator<0> > >(class boost::ptr_container_detail::static_move_ptr > >,struct boost::heap_clone_allocator>::null_clone_allocator<0> > > &)" (??0?$static_move_ptr@UTest@@U?$clone_deleter@U ?$null_clone_allocator@$0A@@?$reversible_ptr_container@ U?$sequence_config@UTest@@V?$list@PAXV?$allocator@PAX@std@@@std@@@
Hi,
I'm having trouble using the boost::ptr_container library. I seem to get
this linker error with the code below under MSVC8.
error LNK2001: unresolved external symbol "public: __thiscall
boost::ptr_container_detail::static_move_ptr
Mark Snelling wrote:
Hi,
I'm having trouble using the boost::ptr_container library. I seem to get this linker error with the code below under MSVC8.
typedef boost::ptr_list< Test > MyList; typedef MyList::auto_type TestPtr;
struct MyClass { MyList theList;
void push( TestPtr& t ) {
void push( Test* );
theList.push_back ( t.release() ); }
TestPtr pop()
std::auto_ptr<Test> pop();
{ TestPtr t = theList.pop_front(); return t; } };
return theList.pop_front().release();
I'm not aware of the ptr_container library having an import library and am at a loss at why this error is occurring, although it seems to be with the MyClass::pop() method. Is it because it's returning the auto_type by value? If so what are the alternatives?
auto_type is not copyable, so yes, this is probably your error. Try the interface modifications I suggest above -Thorsten
participants (2)
-
Mark Snelling
-
Thorsten Ottosen