Add -lrt
to the end of g++ command line. This links in the librt.so “Real Time” shared library.
Related Posts:
- Sleep for milliseconds
- Sleep for milliseconds
- error: lvalue required as unary & operand
- How to print pthread_t
- error: lvalue required as unary & operand
- Why am I getting “undefined reference to main”
- Using O_RDWR vs O_RDONLY | O_WRONLY
- expected identifier before string constant
- to_string not declared in scope
- Implementing a tree in C++
- G++ undefined reference to class::function
- C++ : Exception occurred in script: basic_string::_S_construct NULL not valid
- How to throw a C++ exception
- The static keyword and its various uses in C++
- What is the ‘override’ keyword in C++ used for? [duplicate]
- Unresolved external symbol in object files
- Mutex example / tutorial? [closed]
- “std::bad_alloc”: am I using too much memory?
- What does “dereferencing” a pointer mean?
- What is a smart pointer and when should I use one?
- “Couldn’t find a file descriptor referring to the console” on Ubuntu bash on Windows
- check if a std::vector contains a certain object?
- Convert char to int in C and C++
- How to convert a char array to a string?
- A proper way to create a matrix in c++
- No matching member function for call to ‘push_back’ error
- “X does not name a type” error in C++
- Difference between long double and double in C and C++ [duplicate]
- Why there is no pop_front method in C++ std::vector?
- How do I generate a random number between two variables that I have stored?
- make: g++: Command not found
- What is an ‘undeclared identifier’ error and how do I fix it?
- Use of “this” keyword in C++
- C++ error: “Array must be initialized with a brace enclosed initializer”
- Why am I getting string does not name a type Error?
- How to avoid the error: terminate called after throwing an instance of ‘std::logic_error’ what(): basic_string::_S_construct null not valid
- Error while overloading operator (must be a nonstatic member function)
- C++ Fatal Error LNK1120: 1 unresolved externals
- Vector of structs initialization
- C++ deprecated conversion from string constant to ‘char*’
- using pip3: module “importlib._bootstrap” has no attribute “SourceFileLoader”
- Converting a vector
to string - std::string formatting like sprintf
- Sorting Characters Of A C++ String
- How to convert vector to array
- “non-standard syntax; use ‘&’ to create a pointer to member” error in Visual Studio 2015
- libpng warning: iCCP: known incorrect sRGB profile
- C++: Expression must have a constant value when declaring array inside function
- What does ‘const static’ mean in C and C++?
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- How to run valgrind with basic c example?
- initial value of reference to non-const must be an lvalue
- Typedef function pointer?
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- cannot declare variable ‘’ to be of abstract type ‘’
- Difference between ‘struct’ and ‘typedef struct’ in C++?
- Debug vs Release in CMake
- C++ Matrix Class
- access violation reading location c++
- C++ template constructor
- PlaySound in C++ Console application?
- Is there a replacement for unistd.h for Windows (Visual C)?
- How to call on a function found on another file?
- How to project a point onto a plane in 3D?
- Using C-string gives Warning: “Address of stack memory associated with local variable returned”
- generate random double numbers in c++
- Cygwin Make bash command not found
- C++ Compiler Error C2280 “attempting to reference a deleted function” in Visual Studio 2013 and 2015
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- Why use pointers?
- Why I cannot cout a string?
- How do I return a char array from a function?
- c++ reading csv file
- Why do you use typedef when declaring an enum in C++?
- Stable Cotangent
- How to change string into QString?
- Including .cpp files
- Class template inheritance C++
- Stray ‘\342’ in C++ program
- gcc -g :what will happen
- QByteArray to QString
- Bitwise Less than or Equal to
- How to automatically convert strongly typed enum into int?
- Function cannot be referenced as it is a deleted function
- C++ correct way to return pointer to array from function
- Understanding error “terminate called after throwing an instance of ‘std::length_error’ what(): basic_string::_S_create Aborted (core dumped)”
- how to find 2d array size in c++
- Getting error “array bound is not an integer constant before ‘]’ token”
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- error C2995: function template has already been defined
- Is there a way to compile C++ to C Code?
- enum to string in modern C++11 / C++14 / C++17 and future C++20
- Digit limitation from decimal point in C++
- error: expected unqualified-id before ‘while’|
- error C2039: ‘string’ : is not a member of ‘std’, header file problem
- How to find and replace string?
- allocating an object of abstract class type error
- “Cannot allocate an object of abstract type” error
- GPG does not have enough entropy
- Why don’t EC2 ubuntu images have swap?