C++ multi-threading programming, debian, g++, gnumake

Sep 23, 2018 11:25


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
  • and
  • std::thread
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

make, debian, std::thread, cplusplus, programming, thread, gnumake, 2018

Previous post Next post
Up