title: C++ boost/multiprecision: fatal error: mpfr.h: No such file or directory
body: <p>I have followed <a href="https://stackoverflow.com/questions/257353/whats-bigger-than-a-double#18636454">this answer</a> and used <a href="http://www.boost.org/doc/libs/1_54_0/libs/multiprecision/doc/html/index.html" rel="nofollow noreferrer">Boost.Multiprecision</a> to use high accuracy floating point numbers (<a href="http://www.boost.org/doc/libs/1_54_0/libs/multiprecision/doc/html/boost_multiprecision/intro.html" rel="nofollow noreferrer">examples</a>). </p>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/multiprecision/mpfr.hpp&gt;  // Defines the Backend type that wraps MPFR
  
  int main(int argc, char** argv)
  {
      namespace mp = boost::multiprecision;     // Reduce the typing a bit later...
      typedef mp::number&lt;mp::mpfr_float_backend&lt;300&gt; &gt;  my_float;
      my_float a, b, c; // These variables have 300 decimal digits precision
  
      return 0;
  }
  </code></pre>
  
  <p>However, I have a serious problem for compilation of this code as I receive the following error:</p>
  
  <pre><code>/usr/include/boost/multiprecision/mpfr.hpp:15:18:
                fatal error: mpfr.h: No such file or directory
  </code></pre>
  
  <p>Even installing <a href="https://stackoverflow.com/questions/7351205/where-to-find-gmp-h#7351295">libgmp3-dev</a> and <a href="https://gmplib.org/" rel="nofollow noreferrer">gmplib</a> did not work.</p>
  
  <p>What is wrong?</p>
  
  <p>CMakeLists.txt</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8.9)
  project (main)
  
  # Libraries
  set(Boost_USE_STATIC_LIBS OFF) 
  set(Boost_USE_MULTITHREADED ON)  
  set(Boost_USE_STATIC_RUNTIME OFF) 
  find_package(Boost 1.54.0 COMPONENTS filesystem regex system thread date_time wave) 
  
  if(NOT Boost_FOUND)
      message( FATAL_ERROR "Boost 1.54.0 not found." )
  endif()
  include_directories(SYSTEM ${Boost_INCLUDE_DIR})
  
  # Flags
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wfatal-errors -std=c++11")
  
  
  include_directories(${Boost_INCLUDE_DIRS}) 
  
  # pre executable commands
  
  
  add_executable(main
      main.cpp
  )
  
  
  # Link
  target_link_libraries(main ${Boost_LIBRARIES})
  target_link_libraries(main ${CMAKE_THREAD_LIBS_INIT})
  </code></pre>