title: Statically compile a C++ app with GCC into a binary
body: <p>How do I statically compile an app with GCC on a Ubuntu machine targeting unix? And how would I target 32-bit/64-bit machines and machines with different versions of GLIBC or whatever a unix C++ app is typically dependent on? I want to then distribute this app in binary form and run it on a unix machine without needing to compile from source.</p>
  
  <p>Similarly, can I <a href="https://stackoverflow.com/questions/579695/how-do-i-cross-compile-c-code-on-windows-for-a-binary-to-also-be-run-on-unix-so?rq=1">compile this app on Windows such that it will run on unix</a>?</p>