title: Cross-build, link issue
body: <p>I have to build a small program to run on a set-top box, and for that I use a specific build toolchain: toolchain-final-mipsisa32r2el-timesys-linux-gnu</p>
  
  <p>The build is composed of 2 parts: one lib static .a file and an executable that use the library.</p>
  
  <p>The lib is correctly build with the following option:</p>
  
  <pre><code>mipsisa32r2el-timesys-linux-gnu-gcc -c --param max-inline-insns-single=2400 
  -o ../../../build/LinuxHost_STB_release/_outLib/STB.o -O2 -fno-strict-aliasing 
  -Winline -Wall -I../../../Modules -I../../../Source 
  -I/opt/toolchains/toolchain-final-mipsisa32r2el-timesys-linux-gnu/include 
  -I -fno-rtti ../../../Source/STBLib/STB.cpp
  </code></pre>
  
  <p>if I run <code>nm</code> on the libSTB.a, I saw the function define in STB.cpp as:</p>
  
  <pre><code> 0000000000000124 T STB_Create
   0000000000000460 T STB_Destroy
  </code></pre>
  
  <p>To compile and link the executable, I use the following command line:</p>
  
  <pre><code>mipsisa32r2el-timesys-linux-gnu-c++ -o ../../../build/LinuxHost_STB_release/STBExample 
  --sysroot=/opt/toolchains/toolchain-final-mipsisa32r2el-timesys-linux-gnu/ 
  -I/opt/toolchains/toolchain-final-mipsisa32r2el-timesys-linux-gnu/include 
  -L../../../build/LinuxHost_STB_release 
  -lSTB ../../../Source/STBLib/STBExample.c
  </code></pre>
  
  <p>But I get the following linker error:</p>
  
  <pre><code>STBExample.c:(.text+0x488): undefined reference to `STB_Create'
  </code></pre>
  
  <p>Any idea of where I made a mistake or on how to investigate ?</p>