title: Getting undefined references when linking against a static library
body: <p>I made a static library with GCC. Building of the library was OK.</p>
  
  <p>When I use it the linker throws undefined reference errors on some functions. But <code>nm</code> says the functions are defined and exported in the static library (marked with T). I know about the linking order that I need to put the libraries after that module that needs them so this can not be a problem.</p>
  
  <p>The static library was built from 3 C files. A.c B.c and D.c The D module depend on A and B (includes their headers).</p>
  
  <p>No problem when I use functions from A and B but when I try to use any function from D I get undefined reference errors on them.</p>
  
  <p>If I move these functions in A or B it works. But not if they are in the D module.</p>
  
  <p>I'm completely run out of ideas what's going on or what is I'm overlooked.</p>
  
  <p>I'm using Code::Blocks and working with plain C files.</p>