title: How to build a C++ project on Xcode 4 from scratch - linking existing and new external libraries
body: <p>I've been trying to build some C++ console-based programs in Xcode. I managed to open a new project (Command-Line Tool -> C++) and to edit main.cpp, but I still can't figure out two things:</p>
  
  <ul>
  <li>how do I create new .cpp and .h files to build new libraries and especially how do I link them to main.cpp (I actually managed to create .h and .cpp files, but importing them in main.cpp with an #include doesn't seem to work)</li>
  <li>how do I link external existing libraries? I have this Stanford C++ Libraries (from CS106B on iTunes U) which are a set of .h headers and a .o archive.</li>
  </ul>
  
  <p>Thanks</p>