You can link the standard c++ library with the -l
flag to gcc:
gcc cplusplus.o -lstdc++ -o myexe
More Related Contents:
- Static variables initialisation order
- What is __gxx_personality_v0 for?
- Compilation fails with “relocation R_X86_64_32 against `.rodata.str1.8′ can not be used when making a shared object”
- gcc: undefined reference to
- Where do object file “Version References” come from?
- How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?
- How to use OpenSSL with GCC?
- Can I link a plain file into my executable? [duplicate]
- Can different GCC dialects be linked together?
- What does exactly the warning mean about hidden symbol being referenced by DSO?
- How exactly does __attribute__((constructor)) work?
- Capturing function exit time with __gnu_mcount_nc
- Why is my program slow when looping over exactly 8192 elements?
- What do linkers do?
- C++ syntax for explicit specialization of a template function in a template class?
- Error “undefined reference to ‘std::cout'”
- How to compile for Windows on Linux with gcc/g++?
- GCC STL bound checking
- When and how to use GCC’s stack protection feature?
- Search a vector of objects by object attribute
- Linking against older symbol version in a .so file
- undefined reference to `__stack_chk_fail’
- error: use of deleted function
- Why is statically linking glibc discouraged?
- SetJmp/LongJmp: Why is this throwing a segfault?
- GCC C++ pow accuracy
- Forcing or preventing use of a particular minor version of libstdc++
- Use of ‘auto func(int)’ before deduction of ‘auto’ in C++14
- GCC std::thread not found in namespace std
- Where can I find an official reference listing the operation of SSE intrinsic functions?