title: Error While Parsing json from a file in C++ using jsonCpp Library
body: <p>I have a JSON file somthing like that</p>
  
  <pre><code>[{ 
   "movie_id": 1, 
   "rating": "9.3", 
   "votes": "1,318,626", 
   "description": "Two imprisoned men bond over a number ....", 
   "title": "The Shawshank Redemption", 
   "poster": "", 
   "release_date": "14 October 1994", 
   "metascore": "80", 
   "director": "Frank Darabont", 
   "storyline": "Andy Dufresne is a young and successful ...",
   "stars": [ "Tim Robbins", "Morgan Freeman", "Bob Gunton" ], 
   "year": "1994", 
   "genre": [ "Crime", "Drama" ], 
   "gallery": [ "unknown1394846836._CB379391227_.png", ], 
   "running_time": "142min"
   },
   {...},
   {...},...]
  </code></pre>
  
  <p>I want to parse data from above file <code>input.json</code>using jsonCpp library and here is the my Code </p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  #include "json/json.h"
  using namespace std;
  int main(){
     Json::Value root;
     Json::Reader reader;
  
     ifstream file("input.json");
     file &gt;&gt; root;
  
     string title = root[0]["title"].asString();
     cout&lt;&lt;title;
     return 0;
  }
  </code></pre>
  
  <p>and I used <code>amalgamate.py</code> to genrate jsoncpp.cpp and <code>json.h</code> files when I am running this code(jsoncpp.cpp) using command <code>g++ jsoncpp.cpp</code> I am getting the following error </p>
  
  <pre><code>/tmp/ccx18K5p.o: In function `main':
  jsoncpp.cpp:(.text+0x19): undefined referen to Json::Value::Value(Json::ValueType)'
  jsoncpp.cpp:(.text+0x28): undefined reference to `Json::Reader::Reader()'
  jsoncpp.cpp:(.text+0x57): undefined reference to `Json::operator&gt;&gt;   (std::istream&amp;, Json::Value&amp;)'
  jsoncpp.cpp:(.text+0x68): undefined reference to `Json::Value::operator[] (int)'
  jsoncpp.cpp:(.text+0x75): undefined reference to  `Json::Value::operator[](char const*)'
  jsoncpp.cpp:(.text+0x8a): undefined reference to `Json::Value::asString[abi:cxx11]() const'
  jsoncpp.cpp:(.text+0xdc): undefined reference to `Json::Value::~Value()'
  jsoncpp.cpp:(.text+0x12b): undefined reference to `Json::Value::~Value()'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>What could be the problem here and how can be resovled that ? </p>
  
  <p><em>Thanks in advance</em> </p>