I have a static library built in symbian^3 and it is linked with a QT application. In the library, when I try to modify a string which is passed by reference, it is crashing.
TestString::Upper is the static function in Symbian^3 library.
In QT, on the click event of a button, I have:
void TestString::Upper(std::string &str)
// int len = str.length(); // works
std::transform(str.begin(), str.end(), str.begin(), toupper); // crashes
// str = "symbian qt"; // crashes
When I try to modify the string, it crashes, saying:
std::string str = std::string("symbian");
QString a = QString(str.c_str());
QLabel *label = new QLabel(a, 0);
Thread has crashed: A data abort exception has occurred accessing 0x616d6164.
But if the same function is built as a static library in QT, it is working.