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

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

문제

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'
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top