[Qt-interest] Qt with x64 computer
P B
chose29 at hotmail.com
Thu Jan 8 16:59:29 CET 2009
Hi Ender,
the content of StdStrg is correct after the toStdString() command. I tried your suggestion just to see but it gives me errors at compile time, errors of the form impossible to cast std::string into const char*,
Thanks for the suggestion though,
Pascale> From: erelender at yahoo.com> Date: Thu, 8 Jan 2009 17:47:31 +0200> To: qt-interest at trolltech.com> Subject: Re: [Qt-interest] Qt with x64 computer> > I've had a similar problem before, i think your problem might be the > same as mine.> > As far as i could find out, std::string has different structure in debug > mode than in release mode. If your program gets linked with the wrong > version (release mode std::string with debug mode app), the value that > .toStdString() returns is invalid, and the resulting string is > corrupted, and therefore causes a crash while deletion.> > In your case, check the value of StdStrg after the assignment. If it > seems to have a garbage value, your problem might be this. I couldn't > figure out a way to resolve this issue, but i found a workaround.> > std::string StdStrg = (const char*)loadfile.toAscii();> This line of code seemed to do the trick for me. Hope this helps you.> > -- > ender> _______________________________________________> Qt-interest mailing list> Qt-interest at trolltech.com> http://lists.trolltech.com/mailman/listinfo/qt-interest
_________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090108/4b66c189/attachment.html
More information about the Qt-interest-old
mailing list