Getting error: 'shared_ptr' in namespace 'std' does not name a type

http://en.cppreference.com/w/cpp/memory/shared_ptr/make_shared use head file in your code.

#include <memory>

I got here googling for a similar error, but the answer did not work:

error: ‘shared_pointer’ in namespace ‘std’ does not name a template type

In my case, it was a typo:

std::shared_pointer

should be

std::shared_ptr

@T.C Looks like you were right. I saw your claim on a different question while looking for a solution for my problem, but as libraries that I am using are compiling with C++11 and STLport I thought that this claim might not be true.

What I think happened is that the libraries I'm using are not using any C++11 features that the STLport is missing. They are only using C++11 features that the gcc compiler supports. I need the gnuStl to support the features that I am using.

My solution was to use the boost implementation for the smart pointers and all other missing C++11 features.