V
V
VitiaKotik2020-06-21 14:10:34
C++ / C#
VitiaKotik, 2020-06-21 14:10:34

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
5eef3ff06f8d9239145940.png
How to fix ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VitiaKotik, 2020-06-21
@VitiaKotik

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 question

Ask a Question

731 491 924 answers to any question