In all .cpp files, remove using namespace ndn::ptr_lib and explicitly use ptr_lib::shared_ptr and make_shared.
diff --git a/src/security/key-chain.cpp b/src/security/key-chain.cpp
index fc05969..26dcec8 100644
--- a/src/security/key-chain.cpp
+++ b/src/security/key-chain.cpp
@@ -12,7 +12,6 @@
 #include <ndn-cpp/security/key-chain.hpp>
 
 using namespace std;
-using namespace ndn::ptr_lib;
 using namespace ndn::func_lib;
 #if NDN_CPP_HAVE_STD_FUNCTION
 // In the std library, the placeholders are in a different namespace than boost.
@@ -21,7 +20,7 @@
 
 namespace ndn {
   
-KeyChain::KeyChain(const shared_ptr<IdentityManager>& identityManager, const shared_ptr<PolicyManager>& policyManager)
+KeyChain::KeyChain(const ptr_lib::shared_ptr<IdentityManager>& identityManager, const ptr_lib::shared_ptr<PolicyManager>& policyManager)
 : identityManager_(identityManager), policyManager_(policyManager), face_(0), maxSteps_(100)
 {  
 }
@@ -32,7 +31,7 @@
   identityManager_->signByCertificate(data, certificateName, wireFormat);
 }
 
-shared_ptr<Signature> 
+ptr_lib::shared_ptr<Signature> 
 KeyChain::sign(const uint8_t* buffer, size_t bufferLength, const Name& certificateName)
 {
   return identityManager_->signByCertificate(buffer, bufferLength, certificateName);
@@ -62,7 +61,7 @@
   identityManager_->signByCertificate(data, signingCertificateName, wireFormat);  
 }
 
-shared_ptr<Signature> 
+ptr_lib::shared_ptr<Signature> 
 KeyChain::signByIdentity(const uint8_t* buffer, size_t bufferLength, const Name& identityName)
 {
   Name signingCertificateName = identityManager_->getDefaultCertificateNameForIdentity(identityName);
@@ -75,12 +74,12 @@
 
 void
 KeyChain::verifyData
-  (const shared_ptr<Data>& data, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, int stepCount)
+  (const ptr_lib::shared_ptr<Data>& data, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, int stepCount)
 {
   _LOG_TRACE("Enter Verify");
 
   if (policyManager_->requireVerify(*data)) {
-    shared_ptr<ValidationRequest> nextStep = policyManager_->checkVerificationPolicy
+    ptr_lib::shared_ptr<ValidationRequest> nextStep = policyManager_->checkVerificationPolicy
       (data, stepCount, onVerified, onVerifyFailed);
     if (nextStep)
       face_->expressInterest
@@ -95,7 +94,7 @@
 }
 
 void
-KeyChain::onCertificateData(const shared_ptr<const Interest> &interest, const shared_ptr<Data> &data, shared_ptr<ValidationRequest> nextStep)
+KeyChain::onCertificateData(const ptr_lib::shared_ptr<const Interest> &interest, const ptr_lib::shared_ptr<Data> &data, ptr_lib::shared_ptr<ValidationRequest> nextStep)
 {
   // Try to verify the certificate (data) according to the parameters in nextStep.
   verifyData(data, nextStep->onVerified_, nextStep->onVerifyFailed_, nextStep->stepCount_);
@@ -103,8 +102,8 @@
 
 void
 KeyChain::onCertificateInterestTimeout
-  (const shared_ptr<const Interest> &interest, int retry, const OnVerifyFailed& onVerifyFailed, const shared_ptr<Data> &data, 
-   shared_ptr<ValidationRequest> nextStep)
+  (const ptr_lib::shared_ptr<const Interest> &interest, int retry, const OnVerifyFailed& onVerifyFailed, const ptr_lib::shared_ptr<Data> &data, 
+   ptr_lib::shared_ptr<ValidationRequest> nextStep)
 {
   if (retry > 0)
     // Issue the same expressInterest as in verifyData except decrement retry.