[Short article] Issues to pay attention to when using g++ to compile source files that use thread header files in Linux

September 22, 2023, Sunday evening


When programming on Linux, if the thread header file is used, the parameter -lpthread must be added when compiling with g++

g++ -g code.cpp -o code -lpthread

Guess you like

Origin blog.csdn.net/m0_61629312/article/details/133186135