EN
g++ - /usr/bin/ld: program: _ZSt4cout: invalid version 2 (max 0)
1 answers
5 points
What is the reasone of the error when I use g++
command to compile C++ source code (this source code)?
g++
compilation error:
xxxxxxxxxx
1
/usr/bin/ld: program: _ZSt4cout: invalid version 2 (max 0)
2
/usr/bin/ld: program: error adding symbols: bad value
3
collect2: error: ld returned 1 exit status
The command I use:
xxxxxxxxxx
1
g++ -O3 program program.cpp
1 answer
4 points
It looks like you don't have defined output program name correctly (-o
parameter is missing).
Check:
xxxxxxxxxx
1
g++ -O3 -o program program.cpp
0 commentsShow commentsAdd comment