rib: Use only a forward declaration of RibManager in the header of Nrd class

Change-Id: I8a681dc9a75ac8cdabc289e685ec6a505cfb5aac
diff --git a/rib/nrd.cpp b/rib/nrd.cpp
index be1f527..b4ff276 100644
--- a/rib/nrd.cpp
+++ b/rib/nrd.cpp
@@ -52,6 +52,13 @@
 {
 }
 
+Nrd::~Nrd()
+{
+  // It is necessary to explicitly define the destructor, because some member variables
+  // (e.g., unique_ptr<RibManager>) are forward-declared, but implicitly declared destructor
+  // requires complete types for all members when instantiated.
+}
+
 void
 Nrd::initialize()
 {
diff --git a/rib/nrd.hpp b/rib/nrd.hpp
index fda116b..e861422 100644
--- a/rib/nrd.hpp
+++ b/rib/nrd.hpp
@@ -28,7 +28,6 @@
 
 #include "common.hpp"
 #include "core/config-file.hpp"
-#include "rib-manager.hpp"
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
@@ -37,6 +36,8 @@
 namespace nfd {
 namespace rib {
 
+class RibManager;
+
 /**
  * \brief Class representing NRD (NFD RIB Manager) instance
  * This class can be used to initialize all components of NRD
@@ -69,6 +70,11 @@
   Nrd(const ConfigSection& config, ndn::KeyChain& keyChain);
 
   /**
+   * \brief Destructor
+   */
+  ~Nrd();
+
+  /**
    * \brief Perform initialization of NFD instance
    * After initialization, NFD instance can be started by invoking run on globalIoService
    */