In all .cpp files, remove using namespace ndn::ptr_lib and explicitly use ptr_lib::shared_ptr and make_shared.
diff --git a/src/encoding/der/der.cpp b/src/encoding/der/der.cpp
index fc31161..94578b4 100644
--- a/src/encoding/der/der.cpp
+++ b/src/encoding/der/der.cpp
@@ -15,7 +15,6 @@
 INIT_LOGGER("ndn.der.DER");
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 namespace ndn {
 
@@ -132,7 +131,7 @@
   }
 }
 
-shared_ptr<DerNode>
+ptr_lib::shared_ptr<DerNode>
 DerNode::parse(InputIterator& start)
 {
   int type = ((uint8_t)start.PeekU8());
@@ -140,23 +139,23 @@
   // _LOG_DEBUG("Type: " << hex << setw(2) << setfill('0') << type);
   switch(type) {
     case DER_BOOLEAN:
-      return shared_ptr<DerBool>(new DerBool(start));
+      return ptr_lib::shared_ptr<DerBool>(new DerBool(start));
     case DER_INTEGER:
-      return shared_ptr<DerInteger>(new DerInteger(start));
+      return ptr_lib::shared_ptr<DerInteger>(new DerInteger(start));
     case DER_BIT_STRING:
-      return shared_ptr<DerBitString>(new DerBitString(start));
+      return ptr_lib::shared_ptr<DerBitString>(new DerBitString(start));
     case DER_OCTET_STRING:
-      return shared_ptr<DerOctetString>(new DerOctetString(start));
+      return ptr_lib::shared_ptr<DerOctetString>(new DerOctetString(start));
     case DER_NULL:
-      return shared_ptr<DerNull>(new DerNull(start));
+      return ptr_lib::shared_ptr<DerNull>(new DerNull(start));
     case DER_OBJECT_IDENTIFIER:
-      return shared_ptr<DerOid>(new DerOid(start));
+      return ptr_lib::shared_ptr<DerOid>(new DerOid(start));
     case DER_SEQUENCE:
-      return shared_ptr<DerSequence>(new DerSequence(start));
+      return ptr_lib::shared_ptr<DerSequence>(new DerSequence(start));
     case DER_PRINTABLE_STRING:
-      return shared_ptr<DerPrintableString>(new DerPrintableString(start));
+      return ptr_lib::shared_ptr<DerPrintableString>(new DerPrintableString(start));
     case DER_GENERALIZED_TIME:
-      return shared_ptr<DerGtime>(new DerGtime(start));
+      return ptr_lib::shared_ptr<DerGtime>(new DerGtime(start));
     default:
       throw DerDecodingException("Unimplemented DER type");
   }
@@ -190,7 +189,7 @@
   
   while (accSize < size_) {
     // _LOG_DEBUG("accSize: " << accSize);
-    shared_ptr<DerNode> nodePtr = DerNode::parse(start);
+    ptr_lib::shared_ptr<DerNode> nodePtr = DerNode::parse(start);
     accSize += nodePtr->getSize();
     addChild(nodePtr, false);
   }
@@ -215,7 +214,7 @@
 Blob
 DerComplex::getRaw()
 {
-  shared_ptr<vector<uint8_t> > blob(new vector<uint8_t>());
+  ptr_lib::shared_ptr<vector<uint8_t> > blob(new vector<uint8_t>());
   blob->insert(blob->end(), header_.begin(), header_.end());
 
   DerNodePtrList::iterator it = nodeList_.begin();
@@ -241,7 +240,7 @@
 }
 
 void
-DerComplex::addChild(shared_ptr<DerNode> nodePtr, bool notifyParent)
+DerComplex::addChild(ptr_lib::shared_ptr<DerNode> nodePtr, bool notifyParent)
 {
   nodePtr->setParent(this);
 
diff --git a/src/encoding/der/visitor/certificate-data-visitor.cpp b/src/encoding/der/visitor/certificate-data-visitor.cpp
index 4270d68..7edf794 100644
--- a/src/encoding/der/visitor/certificate-data-visitor.cpp
+++ b/src/encoding/der/visitor/certificate-data-visitor.cpp
@@ -18,7 +18,6 @@
 #include "certificate-data-visitor.hpp"
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 INIT_LOGGER("ndn.der.CertificateDataVisitor");
 
@@ -41,7 +40,7 @@
   children[1]->accept(subjectVisitor, param);
   PublicKeyVisitor pubkeyVisitor;
   Certificate* certData = ndnboost::any_cast<Certificate*>(param);
-  certData->setPublicKeyInfo(*ndnboost::any_cast<shared_ptr<PublicKey> >(children[2]->accept(pubkeyVisitor)));
+  certData->setPublicKeyInfo(*ndnboost::any_cast<ptr_lib::shared_ptr<PublicKey> >(children[2]->accept(pubkeyVisitor)));
       
   if(children.size() > 3)
     {
diff --git a/src/encoding/der/visitor/public-key-visitor.cpp b/src/encoding/der/visitor/public-key-visitor.cpp
index a2eab56..a5f5542 100644
--- a/src/encoding/der/visitor/public-key-visitor.cpp
+++ b/src/encoding/der/visitor/public-key-visitor.cpp
@@ -12,7 +12,6 @@
 #include "public-key-visitor.hpp"
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 namespace ndn {
 
@@ -24,10 +23,10 @@
   DerNodePtrList& children = derSeq.getChildren();
 
   SimpleVisitor simpleVisitor;
-  shared_ptr<DerSequence> algoSeq = dynamic_pointer_cast<DerSequence>(children[0]); 
+  ptr_lib::shared_ptr<DerSequence> algoSeq = ptr_lib::dynamic_pointer_cast<DerSequence>(children[0]); 
   OID algorithm = ndnboost::any_cast<OID>(algoSeq->getChildren()[0]->accept(simpleVisitor));  
   Blob raw = derSeq.getRaw();   
-  return ndnboost::any(shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));    
+  return ndnboost::any(ptr_lib::shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));    
 }
 
 } // der