在各种多线程C和C++项目中,我看到-pthread标志应用于编译和链接阶段,而其他人根本不使用它,只是传递-lpthread给链接阶段.
-pthread
-lpthread
有没有危险没有编译和链接-pthread国旗 - 即-pthread实际做什么?我主要对Linux平台感兴趣.
c c++ linux pthreads
c ×1
c++ ×1
linux ×1
pthreads ×1