Error: "undefined reference to `__cxa_get_exception_ptr'" when compiling Qt Creator project for Symbian

StackOverflow https://stackoverflow.com/questions/13539117

Question

When I compile the project for Windows, it builds and runs fine, but when I try to compile it for Symbian S60, I get this error:

undefined reference to `__cxa_get_exception_ptr'
Was it helpful?

Solution

Found the answer here:

Catch by reference rather than by value

Catching by value causes GCC to use the compiler support function __cxa_get_exception_ptr. This is not available in the compiler support libraries on Symbian OS prior to Symbian^3. Catching by reference avoids this problem.

So replacing

catch (QString error)

with

catch (QString &error)

fixes it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top