Answer the question
In order to leave comments, you need to log in
g++ compilation error (Ubuntu). How to fix?
Good afternoon! Visual Studio compiles on Ubuntu server (Linux extension), but this error pops up:
(undefined reference to `pthread_create')
I found the answer on the Internet, you need to add the -pthread parameter, but it does not work :(
Here is a screenshot of Visual Studio: project parameters
How to fix ?
Answer the question
In order to leave comments, you need to log in
The problem was solved. In the project properties -> Linker -> Command line and you need to write -pthread in the additional parameters
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question