Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1958088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:58:13+00:00 2026-05-17T07:58:13+00:00

g++ is letting out an obscure error, undefined reference to ‘__gxx_personality_sj0’ in two lines

  • 0

g++ is letting out an obscure error, undefined reference to '__gxx_personality_sj0' in two lines of my project. What does this mean in this context? I googled a lot and found out this is usually related to the inclusion of C code in C++ or something like that, which is not what I’m going for. (I know the code isn’t high quality, but should compile, I believe).

Projecto.cpp

#include "Projecto.h"
#include <iostream>
#include <iomanip>
#include <string>



Projecto::~Projecto() {} //THIS LINE GETS THAT ERROR

void Projecto::adicionaVerba(float quantia){

 verba+=quantia;

 if(verba > verbamaxima)
  verba -= quantia;
}

std::string Projecto::Tipo()
{ //THIS LINE GETS THAT ERROR

 return "Projecto";
}

void Projecto::Imprime()
{
 Identificador::Imprime();
 cout << verbamaxima << endl;
}


bool Projecto::operator> (const Projecto &proj2) const
{
 return proj2.verba > this->verba;
}

Projecto.h

#ifndef PROJECTO_H_
#define PROJECTO_H_

#include <iostream>
#include <iomanip>
#include "Identificador.h"
#include <string>
#include <vector>

using namespace std;

class Projecto: public Identificador {
protected:

int verbamaxima;
vector<string> projecto;
float verba;

public:
Projecto(int verbamaxima = 0):Identificador("Projecto") {verba=0;}
~Projecto();
string Tipo();
void Imprime();
void adicionaVerba(float quantia);
bool operator> (const Projecto &proj2) const;

};
#endif /* IDENTIFICADOR_H_ */

Identificador.cpp

#include "Identificador.h"

using namespace std;

#include <iostream>
#include <iomanip>


using namespace std;

Identificador::Identificador(string nome):codigo(id)
{
 Identificador::nome = nome;
 id+=2;
}

Identificador::~Identificador()
{
}

int Identificador::id = 1000;

string Identificador::Tipo(){}

void Identificador::Imprime()
{
 cout << Tipo() << endl;
 cout << Codigo() << endl;
 cout << Nome() << endl;
}

int Identificador::Codigo() const
{
 return codigo;
}

string Identificador::Nome()
{
 return nome;
}

Identificador.h

#ifndef IDENTIFICADOR_H_
#define IDENTIFICADOR_H_
#include <iostream>
#include <iomanip>

using namespace std;

class Identificador {
protected:
static int id;
const int codigo;
string nome;
public:
Identificador(string nome);
virtual ~Identificador();
virtual string Tipo();
virtual void Imprime();
int Codigo() const;
string Nome();
};
#endif /* IDENTIFICADOR_H_ */

Thank you for reading this far!

EDIT:

I am using Eclipse with the mingw toolchain. I’ve recently installed Nuwen’s Mingw distro in lieu of the official one. Compiling the project, I get this as console output (never happened before):

**** Build of configuration Debug for project estudo_CI1 ****

**** Internal Builder is used for build               ****
g++ -oestudo_CI1.exe src\main.o src\Universidade.o src\Projecto.o src\Investigador.o src\Identificador.o
Warning: .drectve `-aligncomm:___mingw_gMTRemoveKeyDtor,2 ' unrecognized
Warning: .drectve `-aligncomm:___mingw_gMTKeyDtor,2 ' unrecognized
Warning: .drectve `-aligncomm:___mingw_usemthread_dll,2' unrecognized
Warning: .drectve `-aligncomm:___hexdig_D2A,2' unrecognized
src\Projecto.o: In function `ZN8ProjectoD2Ev':
C:/Users/Francisco/workspace_aeda/estudo_CI1/Debug/../src/Projecto.cpp:16: undefined reference to `__gxx_personality_sj0'
src\Projecto.o: In function `ZN8ProjectoD1Ev':
C:/Users/Francisco/workspace_aeda/estudo_CI1/Debug/../src/Projecto.cpp:16: undefined reference to `__gxx_personality_sj0'
src\Projecto.o: In function `ZN8ProjectoD0Ev':
C:/Users/Francisco/workspace_aeda/estudo_CI1/Debug/../src/Projecto.cpp:16: undefined reference to `__gxx_personality_sj0'
src\Projecto.o: In function `ZN8Projecto4TipoEv':
C:/Users/Francisco/workspace_aeda/estudo_CI1/Debug/../src/Projecto.cpp:27: undefined reference to `__gxx_personality_sj0'
src\Projecto.o: In function `ZNSt12_Vector_baseISsSaISsEE12_Vector_implD1Ev':
C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:(.text$_ZNSt6vectorISsSaISsEED1Ev[std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~vector()]+0xc): undefined reference to `__gxx_personality_sj0'
src\Projecto.o:C:/strawberry/c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_vector.h:(.text$_ZNSt12_Vector_baseISsSaISsEED2Ev[std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~_Vector_base()]+0xc): more undefined references to `__gxx_personality_sj0' follow
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x719): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x739): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x759): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x779): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x799): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios_init.o):ios_init.cc:(.text$_ZNSt8ios_base4InitC2Ev+0x7b9): more undefined references to `_Unwind_Resume' follow
/mingw/lib/libstdc++.a(eh_throw.o):eh_throw.cc:(.text$__cxa_throw+0x4e): undefined reference to `_Unwind_RaiseException'
/mingw/lib/libstdc++.a(eh_throw.o):eh_throw.cc:(.text$__cxa_rethrow+0x37): undefined reference to `_Unwind_Resume_or_Rethrow'
/mingw/lib/libstdc++.a(misc-inst.o):misc-inst.cc:(.text$_ZStrsIwSt11char_traitsIwESaIwEERSt13basic_istreamIT_T0_ES7_RSbIS4_S5_T1_E[std::basic_istream<wchar_t, std::char_traits<wchar_t> >& std::operator>><wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >(std::basic_istream<wchar_t, std::char_traits<wchar_t> >&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&)]+0x270): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_baseD2Ev+0xd1): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_baseD0Ev+0xd6): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_base13_M_grow_wordsEib+0x126): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_base13_M_grow_wordsEib+0x18e): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ios.o):ios.cc:(.text$_ZNSt8ios_base17_M_call_callbacksENS_5eventE+0x4b): more undefined references to `_Unwind_Resume' follow
/mingw/lib/libstdc++.a(eh_personality.o):eh_personality.cc:(.text$__gxx_personality_v0+0xce): undefined reference to `_Unwind_GetIPInfo'
/mingw/lib/libstdc++.a(eh_personality.o):eh_personality.cc:(.text$__cxa_call_unexpected+0xd5): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ext-inst.o):ext-inst.cc:(.text$_ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEED1Ev[__gnu_cxx::stdio_filebuf<char, std::char_traits<char> >::~stdio_filebuf()]+0x67): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ext-inst.o):ext-inst.cc:(.text$_ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEED0Ev[__gnu_cxx::stdio_filebuf<char, std::char_traits<char> >::~stdio_filebuf()]+0x6f): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ext-inst.o):ext-inst.cc:(.text$_ZN9__gnu_cxx13stdio_filebufIwSt11char_traitsIwEED1Ev[__gnu_cxx::stdio_filebuf<wchar_t, std::char_traits<wchar_t> >::~stdio_filebuf()]+0x67): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ext-inst.o):ext-inst.cc:(.text$_ZN9__gnu_cxx13stdio_filebufIwSt11char_traitsIwEED0Ev[__gnu_cxx::stdio_filebuf<wchar_t, std::char_traits<wchar_t> >::~stdio_filebuf()]+0x6f): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(ext-inst.o):ext-inst.cc:(.text$_ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEEC2EiSt13_Ios_Openmodej[__gnu_cxx::stdio_filebuf<char, std::char_traits<char> >::stdio_filebuf(int, std::_Ios_Openmode, unsigned int)]+0xb1): more undefined references to `_Unwind_Resume' follow
/mingw/lib/libstdc++.a(eh_globals.o):eh_globals.cc:(.text$__cxa_get_globals_fast+0xb): undefined reference to `__emutls_get_address'
/mingw/lib/libstdc++.a(eh_globals.o):eh_globals.cc:(.text$__cxa_get_globals+0xb): undefined reference to `__emutls_get_address'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZNSi7getlineEPcic+0x26d): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZNSi6ignoreEii+0x2a4): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_PS3_+0x241): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RSbIS4_S5_T1_E+0x2d9): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RSbIS4_S5_T1_ES4_+0x2a1): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(istream.o):istream.cc:(.text$_ZNSt13basic_istreamIwSt11char_traitsIwEE7getlineEPwiw+0x2a5): more undefined references to `_Unwind_Resume' follow
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$_ZN12_GLOBAL__N_1L4initEv+0x14): undefined reference to `__gthr_win32_recursive_mutex_init_function'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$_ZN9__gnu_cxx17__recursive_mutex6unlockEv[__gnu_cxx::__recursive_mutex::unlock()]+0x15): undefined reference to `__gthr_win32_recursive_mutex_unlock'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_acquire+0x40): undefined reference to `__gthr_win32_recursive_mutex_lock'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_acquire+0xe8): undefined reference to `__gthr_win32_recursive_mutex_unlock'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_acquire+0x12d): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_abort+0x21): undefined reference to `__gthr_win32_recursive_mutex_unlock'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_abort+0x5c): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_release+0x29): undefined reference to `__gthr_win32_recursive_mutex_unlock'
/mingw/lib/libstdc++.a(guard.o):guard.cc:(.text$__cxa_guard_release+0x64): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(c++locale.o):c++locale.cc:(.text$_ZSt14__convert_to_vIfEvPKcRT_RSt12_Ios_IostateRKPi+0x126): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(c++locale.o):c++locale.cc:(.text$_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi+0x129): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(c++locale.o):c++locale.cc:(.text$_ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi+0x151): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(iostream-inst.o):iostream-inst.cc:(.text$_ZNSdC2EPSt15basic_streambufIcSt11char_traitsIcEE[std::basic_iostream<char, std::char_traits<char> >::basic_iostream(std::basic_streambuf<char, std::char_traits<char> >*)]+0x9b): undefined reference to `_Unwind_Resume'
/mingw/lib/libstdc++.a(iostream-inst.o):iostream-inst.cc:(.text$_ZNSdC1EPSt15basic_streambufIcSt11char_traitsIcEE[std::basic_iostream<char, std::char_traits<char> >::basic_iostream(std::basic_streambuf<char, std::char_traits<char> >*)]+0xea): more undefined references to `_Unwind_Resume' follow
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 1621  ms. 

EDIT 2:

This has probably nothing to do with the above code, as all projects I compile seem fail with these errors (they compiled fine before).

EDIT 3:
SOLVED by deleting .metadata. Thanks anyway guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T07:58:14+00:00Added an answer on May 17, 2026 at 7:58 am

    make sure you are compiling with g++, not gcc, AND make sure that the file extension is .cpp not .c

    Furthermore, if you can edit your post and include the g++ command you are using, that would be a big help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following jquery, what is letting the user to fill out additional
Does anybody have any experience with TFS no longer letting somebody queue a new
I've seen a few instances now where web applications are letting try them out
I can't for the life of me fathom out why this RewriteCond is causing
I want to lay out a grid by appending divs to body and letting
I'm sure this is a rookie mistake but I can't figure out what I'm
I am into a problem from two days and I can not get out
I have tried to figure out a way of letting a jquery dialog button
I'm building out a small project to try to teach myself as much of
We're letting users search a database from a single text input and I'm having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.