title: how to link arm math library to compile for the stm32f4
body: <p>I am trying to calculate FFT on the stm32f4 </p>
  
  <p>The first errors I got were:</p>
  
  <pre><code>/home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:111: undefined reference to `arm_cfft_radix4_init_f32'
  /home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:114: undefined reference to `arm_cfft_radix4_f32'
  /home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:117: undefined reference to `arm_cmplx_mag_f32'
  /home/mennesker/Workspace/stm/STM-mainopdracht2/main.c:120: undefined reference to `arm_max_f32'
  </code></pre>
  
  <p>So I Thought I need to link the library because in the include files there are only .h files.</p>
  
  <p>The libraries are in the same root folder so,
   the .h files (arm_math.h and core_cm4.h) are in the folder:</p>
  
  <pre><code>/home/mennesker/Workspace/stm/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Include/
  </code></pre>
  
  <p>The library arm_cortexM4b_math.lib is in folder:</p>
  
  <pre><code>/home/mennesker/Workspace/stm/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/Lib/ARM/
  </code></pre>
  
  <p>I tried many different variantions of paths where to put the library to link with using <code>-l arm_cortexM4b_math.lib</code> as linker option or <code>-l &lt;path to file&gt; /arm_cortexM4b_math.lib</code></p>
  
  <p>But I still get the error:</p>
  
  <pre><code>/usr/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld: cannot find -larm_cortexM4b_math.lib
  </code></pre>
  
  <p>I don't know where the linker looks and how this linking really works</p>