You might try using the -pthread option to g++.
-pthread
Adds support for multithreading with the pthreads library. This
option sets flags for both the preprocessor and linker.
More Related Contents:
- Unresolved external symbol LNK2019
- Why do I get “unresolved external symbol” errors when using templates? [duplicate]
- Splitting templated C++ classes into .hpp/.cpp files–is it possible?
- How do I make a fully statically linked .exe with Visual Studio Express 2005?
- How does C++ linking work in practice? [duplicate]
- What is an undefined reference/unresolved external symbol error and how do I fix it?
- What do linkers do?
- How to increase thread priority in pthreads?
- Undefined symbols “vtable for …” and “typeinfo for…”?
- when g++ static link pthread, cause Segmentation fault, why?
- Difference between shared objects (.so), static libraries (.a), and DLL’s (.so)?
- error LNK2005: already defined – C++
- MinGW linker error: winsock
- Multi-threading benchmarking issues
- condition variable – why calling pthread_cond_signal() before calling pthread_cond_wait() is a logical error?
- questions about name mangling in C++
- How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?
- Why is statically linking glibc discouraged?
- static variables in an inlined function
- GCC linker can’t find standard library?
- Can I link a plain file into my executable? [duplicate]
- Do pthread mutexes work across threads if in shared memory?
- Function already defined error in C++
- cmake – Global linker flag setting (for all targets in directory)
- What does exactly the warning mean about hidden symbol being referenced by DSO?
- Using a static library in Qt Creator
- Linking C++ code with ‘gcc’ (without g++)
- How to force inclusion of an object file in a static library when linking into executable?
- Undefined symbols for architecture x86_64 – Mavericks (Yosemite, El Capitan…)
- How to Embed/Link binary data into a Windows module