I have encountered an error on Linux while using Posix threads with Code runner on VS Code- an error of undefined reference to pthread_create();
Asked
Active
Viewed 949 times
0
1 Answers
0
To fix it please add -pthread argument in code runner settings.json:
"cpp": "cd $dir && g++ $fileName -pthread -o $fileNameWithoutExt &&

Gaurav_is_lucky
- 11
- 4
-
As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 16 '22 at 17:09