Reputation: 35
My c++ application in visual studio 2015 runs perfectly. It uses an input file and generates a bunch of other files.
When I try to use the .exe file from the Release folder, it disappears. And when I run it from cmd, it does nothing..
Maybe it's to little information I can give you but.. I don't really know how to explain it better...
Upvotes: 0
Views: 821
Reputation: 477
You can still debug it. I think you could run it but it immediately terminate.
Place breakpoint at beginning of code __asm{ int 3 }
or __debugbreak()
. It will crash immediately and now you can attach debugger and continue with debugging to observe what's going on.
Also you could turn off optimization for release to debug it easily.
Upvotes: 0
Reputation: 458
There are multiple problems that might lead to this so I cannot give a full answer, but most issues come from:
Solve: Review the code for filenames loaded without using full directory path. Copy those files in your relese folder (the folder structure relative to release for these files, must be identical to the one relative to vcxproj
Solve: Use depends to find them and copy near the exe: http://www.dependencywalker.com/
Upvotes: 1