C++ multi-threading programming, g++, gnumake
For the compiler in Debian Stable that I use, the Programmer needs to add two flags to enable support for
functionality to the CXXFLAGS variable.
So in my makefile(s) that I use for using C++ multi-threading, I added the below two CXXFLAGS.
- "-std=c++11" and
- "-pthread"
#
# CXXFLAGS
# used by gnu make's implicit rules
#
# I choose to show all warnings (-Wall), and include debugging information (-g)
# I choose to include support for C++11 (-std=c++11);
# the g++ version in my Debian Stable, g++ version 4.9.2,
# requires it to use std::thread
# I choose to include support for pthreads (-pthread)
# the g++ version in my Debian Stable, g++ version 4.9.2,
# requires it to use std::thread
#
CXXFLAGS := -Wall -g -std=c++11 -pthread