Basic compilation

To compile a program (source file biohello.cpp) using Bio++, you need to link the libraries.

Dynamic linkage
Programs compiled with dynamic linkage will not run without the libraries. Libraries must be in the same path than the path used for compilation.

The -I and -L options are needed only if you installed the libraries in a non-standard place. Here the five libraries are included, you may omit the two last ones if you do not use phylogenetic and/or population genetics classes.

Static linkage
Programs compiled with static linkage are stand-alone programs and do not require the libraries to be present when running. This is the only linkage available under cygwin.

When compiling with static linkage, the order of the libraries to include is important: Here again you may omit the PopGen and Phyl libraries. The strip command removes all unused code from the executable, and efficiently decreases its size.