Instead of giving lengthy compiler commands at the command prompt, you can use a Makefile to do most of the work. How to:
census.c, then the first line will read
.cfiles, add a corresponding
.oto the currently blank
makeat the command prompt to generate the executable.
pkg-config, then you can use it for a slightly more robust and readable makefile. Replace the above C and link flags with:
pkg-configprogram will then fill in the appropriate directories and libraries. Pkg-config knows Apophenia depends on the GSL and database libraries, so you need only list the most-dependent library.
-O3flag is optional, asking the compiler to run its highest level of optimization (for speed).
–std=gnu11flag to use post-1989 C standards.
gcc sample.c -lapopheniawill work, while
gcc -lapophenia sample.cis likely to give you errors. Similarly, list
-lgsl, which comes before