Slow week. Down with workload at work and home and sick as well.
Lots of C++ related stuff this coming weeks. I was reminded again and again why programming in C++ is not an exciting experiences. The complexity of the whole development environment and the lack of my undertanding of the compilation cycle caused me stuck on simple trivial matters and can't proceed ahead. That's is part of the learning process every one have to go through when picking up something new in such a short notice.
The first concept you need to understand is compilation model which consists of four tools of Preprocessor, Compiler, Assembler, and Linker. The source code goes though these four tools to generate the final executable binary. Coming from a dyanmic-typed programming languages (PHP, Perl, Python, and etc.), the whole process seems quite a hassle. But programs generated by C/C++ is probably the most optimized human readable assembly code. Few things I've picked up.
- Auto-linking does not exists for GCC excepts Windows compilers or Clang.
- `<iostream.h>` is the legacy way of adding standard include header.
- Installing and linking a shared library is quite a painful process.
- If you encounter undefined references error, you linking process is configured incorrectly.