undefined reference to `__gxx_personality_sj0`

前端 未结 5 2294
余生分开走
余生分开走 2020-11-27 18:17

With gcc 4.6 when trying to execute this code:

   #include 

using namespace std;

#include 

int main()
{
   //Int<> a         


        
5条回答
  •  清酒与你
    2020-11-27 19:12

    as smallB noted in a comment, you may have used gcc, focused on C programs, but you had a C++ program.

    To compile a C++ program, make sure to use the g++ compiler driver instead!

    example:

    BAD: gcc -o foo.exe foo.cpp

    GOOD: g++-o foo.exe foo.cpp

提交回复
热议问题