Reputation: 8975
I am dealing with a very peculiar problem at the moment: I have an application that is fully working in Debug-Buildmode, whether I run it from the MSVC environment or start the built executable myself. If I build this application in Release-Buildmode, it is fully working when I run it from the MSVC environment, but shows unexpected behavior when I start it myself.
What differences between the Debug and Release mode could be the reason for this behavior, and why do the problems only occur when I start the executable manually?
It's hard to give code, since it is quite a big project and I have absolutely no clue what could be causing the problem. The program flow is basically:
boost::thread
) and triggers callback functions on certain events (these do NOT trigger if release build is executed manually)Something that I could imagine might cause problems, but I am not sure of:
std::string
and std::wstring
. I am converting from one to another using std::wstring(s.begin(), s.end())
and vice versa.Could this be the reason for my problems, and if yes, how do I solve the issue? I would really appreciate some help on this. Thanks in advance.
Update:
Update 2:
Multithreaded-Debug-DLL
, not the Multithreaded-DLL
, regardless to optimization settings.This seems to be a nice accomplishment, yet I lack the understanding for this problem.
Upvotes: 0
Views: 316
Reputation: 11787
debug do not use optimizations there are optimizations in release mode that is why the exe size is different. Also the libraries used are different even though out of the same codes. you can make release like debug by turning off the optimization options.
Upvotes: 1
Reputation: 50036
Add logging, or eliminate some code blocks. This should allow to find where problem arises. For differences look here:
What is the difference between Debug and Release in Visual Studio?
Upvotes: 1