Recently I ran a code, to change the color of the output in the terminal. After running that c++ program, now if I run any c++ program in Linux I am getting some weird errors. I have attached the error picture.
Asked
Active
Viewed 167 times
-1
-
Hi and welcome to Stack Overflow. Please share the source code that is generating the error along with the command you are using to compile it. – cbuchart Jun 12 '21 at 11:21
-
1Use `g++` instead of `gcc`. The latter is for C, not C++. – HolyBlackCat Jun 12 '21 at 11:22
-
The rules [require](https://meta.stackoverflow.com/q/285551/2752075) posting text as text, not as screenshots. Suggest doing that next time. – HolyBlackCat Jun 12 '21 at 11:22
1 Answers
3
You appear to be trying to link a C++ program with gcc, which does not automatically link against the C++ standard library. Try using g++ instead.

timemage
- 536
- 1
- 4
- 12