title: How to use the Boost libraries in a C program
body: <p>I'm working on a project which is written in C, but I would like to use Boost. I have included the Boost libraries in my main file as follows:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#define GNU_SOURCE
  #define _GNU_SOURCE
  #include &lt;stdlib.h&gt;
  #include &quot;initialize.h&quot;
  #include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  #include &lt;boost/random/linear_congruential.hpp&gt;
  </code></pre>
  <p>I am compiling with <code>gcc -W -Wall -I/usr/local/boost_1_76_0 main.c -o executable -lm -lboost_random</code>.</p>
  
  <pre class="lang-sh prettyprint-override"><code>main.c:8:10: fatal error: iostream: No such file or directory
      8 | #include &lt;iostream&gt;
  </code></pre>
  <p>I guess that the Boost libraries are using <code>&lt;iostream&gt;</code>, but since it's not a C library, I am not sure how to deal with that issue... Should I compile with C++ instead?</p>