July 2017
Intermediate to advanced
244 pages
6h 33m
English
In order to compile the code described earlier, one could use an IDE, or type the command on the command line. As mentioned in the beginning of this chapter, we'll be using makefiles for the examples in this book. The big advantages of this are that one does not have to repeatedly type in the same extensive command, and it is portable to any system which supports make.
Further advantages include being able to have previous generated artifacts removed automatically and to only compile those source files which have changed, along with a detailed control over build steps.
The makefile for this example is rather basic:
GCC := g++OUTPUT := ch01_mt_exampleSOURCES := $(wildcard *.cpp)CCFLAGS := -std=c++11 -pthreadall: $(OUTPUT)$(OUTPUT): ...
Read now
Unlock full access