title: undefined reference to `USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1_'
body: <p>So when I use the command <code>make</code> I get the following error:</p>
  
  <pre><code>[jalal@goku c++]$ make
  [ 25%] Building CXX object CMakeFiles/TestSVM.dir/TestSVM.cpp.o
  [ 50%] Linking CXX executable TestSVM
  CMakeFiles/TestSVM.dir/TestSVM.cpp.o: In function `__static_initialization_and_destruction_0(int, int)':
  TestSVM.cpp:(.text+0x28c3): undefined reference to `USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1_'
  TestSVM.cpp:(.text+0x28cf): undefined reference to `USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2'
  collect2: error: ld returned 1 exit status
  make[2]: *** [TestSVM] Error 1
  make[1]: *** [CMakeFiles/TestSVM.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>The files look like:</p>
  
  <pre><code>[jalal@goku c++]$ ls
  CMakeCache.txt  CMakeFiles  CMakeLists.txt  Makefile  TestSVM.cpp  TrainSVM.cpp  cmake_install.cmake  json.hpp  trained_svms
  </code></pre>
  
  <p>I built the <code>dlib</code> in <code>/scratch2/dlib</code> from source using this repo:<a href="https://github.com/davisking/dlib" rel="nofollow noreferrer">https://github.com/davisking/dlib</a>
  by following these commands:</p>
  
  <pre><code>mkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build .
  </code></pre>
  
  <p>I am not sure how I should fix this problem.
  I followed the following commands in the git repo I cloned:</p>
  
  <pre><code>$ cd c++
  $ cmake .
  $ make
  </code></pre>
  
  <p><a href="https://github.com/sausax/pose_estimation" rel="nofollow noreferrer">https://github.com/sausax/pose_estimation</a></p>
  
  <p>Additionally not sure how to make sense out of this for fixing the bug</p>
  
  <p><a href="https://github.com/davisking/dlib/blob/master/dlib/test_for_odr_violations.cpp" rel="nofollow noreferrer">https://github.com/davisking/dlib/blob/master/dlib/test_for_odr_violations.cpp</a></p>