title: Compiling Caffe C++ Classification Example
body: <p>I recently modified the Caffe <a href="https://github.com/BVLC/caffe/blob/master/examples/cpp_classification/classification.cpp" rel="noreferrer">C++ classification example file</a> and I am trying to recompile it. However, I'm having trouble linking a simple g++ compilation to the .hpp files in the include directory. I know this is a basic question but I can't seem to work it out - can someone help me work out how to compile this program? The compilation looks like this now:</p>
  
  <pre><code>g++ -I /home/jack/caffe/include classification.cpp -o classify
  </code></pre>
  
  <p>But I'm getting this error:</p>
  
  <pre><code>In file included from /home/jack/caffe/include/caffe/common.hpp:19:0,
      from /home/jack/caffe/include/caffe/blob.hpp:8,
      from /home/jack/caffe/include/caffe/caffe.hpp:7,
      from classification.cpp:1:
  /home/jack/caffe/include/caffe/util/device_alternate.hpp:34:23: fatal error: cublas_v2.h: No such file or directory
   #include &lt;cublas_v2.h&gt;
  </code></pre>
  
  <p>I'm running this on a machine without Nvidia GPUs so when I looked at the device_alternate.hpp file I realised this is calling a lot of cuda-related .hpp files as well which don't exist.</p>