title: Compiling caffe causing undefined references with google namespace
body: <p>I had problems with my code which was causing errors because of gflags. So i decided to play with gflags repositories and linkings manually which seems that was a bad idea. Now I even cannot compile caffe.</p>
  
  <p>While making it all this following command</p>
  
  <pre><code>make all -j $(($(nproc) + 1))
  </code></pre>
  
  <p>I am getting following error message. </p>
  
  <pre><code>.build_release/tools/convert_imageset.o: In function `_GLOBAL__sub_I_convert_imageset.cpp':
  convert_imageset.cpp:(.text.startup+0x74): undefined reference to `google::FlagRegisterer::FlagRegisterer&lt;bool&gt;(char const*, char const*, char const*, bool*, bool*)'
  convert_imageset.cpp:(.text.startup+0xa3): undefined reference to `google::FlagRegisterer::FlagRegisterer&lt;bool&gt;(char const*, char const*, char const*, bool*, bool*)'
  convert_imageset.cpp:(.text.startup+0x117): undefined reference to `google::FlagRegisterer::FlagRegisterer&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;(char const*, char const*, char const*, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;*, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;*)'
  </code></pre>
  
  <p>I looked through Internet for some possible solutions in some git threads and some other  <a href="https://groups.google.com/forum/#!topic/caffe-users/l7DpTvEud20" rel="nofollow noreferrer">threads</a> . Nothing working. Any kind of help or suggestion will be highly appreciated.</p>