title: How to work with external libraries when cross compiling?
body: <p>I am writing some code for raspberry pi ARM target on x86 ubuntu machine. I am using the gcc-linaro-armhf toolchain. I am able to cross compile and run some independent programs on pi. Now, I want to link my code with external library such as ncurses. How can I achieve this.</p>
  
  <p>Should I just link my program with the existing ncurses lib on host machine and then run on ARM? (I don't think this will work)
  Do I need to get source or prebuilt version of lib for arm, put it in my lib path and then compile?</p>
  
  <p>What is the best practice in this kind of situation?</p>
  
  <p>I also want to know how it works for the c stdlib. In my program I used the stdio functions and it worked after cross compiling without doing anything special. I just provided path for my arm gcc in makefile. So, I want to know, how it got correct std headers and libs?</p>