Complie error: 'make_shared’ was not declared in this scope

12 Oct
2008
12 Oct
'08
1:04 p.m.
Hi everyone I meet this error: "class.cpp:89: error: no matching function for call to 'make_shared(const boost::weak_ptrzeitgeist::Core&)' and the code is: *return make_shared(mCore);* I'm using gcc 4.3.1 and boost 1.36.0. I tried to solve the problem by using *shared_ptr<Core>(mCore)* but got a run-time error. Could someone help me?

14 Oct
14 Oct
4:53 p.m.
New subject: [Boost-users] Complie error: 'make_shared' was not declared in this scope
Michael Chen:
Hi everyone I meet this error: "class.cpp:89: error: no matching function for call to 'make_shared(const boost::weak_ptrzeitgeist::Core&)' and the code is: *return make_shared(mCore);* I'm using gcc 4.3.1 and boost 1.36.0. I tried to solve the problem by using *shared_ptr<Core>(mCore)* but got a run-time error. Could someone help me?
I suspect that you need to use mCore.lock().
5977
Age (days ago)
5979
Last active (days ago)
1 comments
2 participants
participants (2)
-
Michael Chen
-
Peter Dimov