When building code example.cc
int main() { return 0; }
by team
$ gcc -o пример пример.cc && ./пример
an error is displayed
undefined reference to '__gxx_personality_v0'
What could be the problem?
Or rename the file as an пример.c
. I remind you:
.c
..cc
, .cp
, .cxx
, .cpp
, .c++
, .C
.Variants of such perversions as compilation of GCC, and then linking G ++, are omitted. Another way is to use the -x
option of the compiler, which specifies the language to be used.
It is necessary so:
$ g++ -o пример пример.cc && ./пример
Source: https://ru.stackoverflow.com/questions/285/
All Articles