title: Linking gfortran libraries to c++ program in CodeBlocks under Ubuntu
body: <p>I have an Ubuntu under Vmware, and use Code::Blocks, as I am not a very powerful command line user
  and prefer IDE to Vim+console.</p>
  
  <p>I am trying to compile a program which uses a c++ wrapper to fortran library.
  However compiling gives me the following errors:</p>
  
  <pre><code>undefined reference to `_gfortran_compare_string'
  </code></pre>
  
  <p>There are a lot of errors of this type and a bunch of other similar to this one.</p>
  
  <p>I have gfortran 4.6.3. I found searching that it is probably a linking problem, and people say to
  use -lgfortran option for linker. When I add this to linker options in the Code::Blocks it does not change anything, errors continue. So, here are some question:</p>
  
  <ol>
  <li>Is this a correct option for linker? </li>
  <li>May be I have to give linker a direct path to the fortran library?</li>
  <li>How do I find where are the fortran libraries installed? (I don't know a lot about linux ((( )</li>
  <li>What am I doing wrong and how to fix it.</li>
  </ol>