After using toStdString, the string exhibited abnormal behavior.
-
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
@John-Van said in After using toStdString, the string exhibited abnormal behavior.:
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
@Christian-Ehrlicher is suggesting you are mixing debug and release libraries. Check your compile/link commands carefully, particularly how you are compiling your code versus which libraries you are using/how they were compiled. We have often found that people are inadvertently e.g. compiling for debug but linking with release libraries or vice versa, which is not allowed and leads to unexpected behaviour.
Also if you have a Windows problem please state what compiler you are using --- MSVC or MinGW, we cannot guess. You now have responses indicating it works correctly with each of them.
-
Don't mix debug and release libraries. It is working as expected here with MSVC.
-
Don't mix debug and release libraries. It is working as expected here with MSVC.
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
-
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
-
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
@John-Van said in After using toStdString, the string exhibited abnormal behavior.:
@Christian-Ehrlicher Yes, this issue only occurs in debug mode, but it uses debug libraries. Is this a bug in version 5.15?
@Christian-Ehrlicher is suggesting you are mixing debug and release libraries. Check your compile/link commands carefully, particularly how you are compiling your code versus which libraries you are using/how they were compiled. We have often found that people are inadvertently e.g. compiling for debug but linking with release libraries or vice versa, which is not allowed and leads to unexpected behaviour.
Also if you have a Windows problem please state what compiler you are using --- MSVC or MinGW, we cannot guess. You now have responses indicating it works correctly with each of them.
-
J John Van has marked this topic as solved on
