简体   繁体   中英

Cannot run VC++ program without debugging

I can run with debugging and I can run in release mode but I cannot run without debugging. I am pretty sure I messed up the configuration in visual studio somewhere but I am not sure. The computer was frozen I may have inadvertently clicked something. It normally works. Does anybody have any ideas? Thank you!

EDIT: The program works with F5. It also works when I put the configuration to Release and run the executable. However Ctrl + F5 does not work, and the executable it creates does not work either.

I just get an error saying windows is looking for a solution and then this: 替代文字

I even tried getting the entire solution from source safe with the same results...

EDIT 2: After following the windbg advice given to me below, I arrived at this error:

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for mfc71d.dll -

My guess is that you have some undefined behavior in your program, such as uninitialized variables. In debugging mode this doesn't cause a crash because the debugging versions do things like initialize memory for you and don't do any sort of optimization.

Check for wild pointer mistakes, and check for uninitialized memory problems. And turn up the warning level on the C++ compiler to level 4 (the highest practical level). That should help you catch these kinds of mistakes.

It looks like the program crashed. It also looks like that GUI is pointing you at a crash dump. Here's how to inspect the dump.

Download " Debugging tools for Windows " from Microsoft. Install it.

Then run, from a command prompt:

> cd \Program Files\Debugging Tools for Windows (x64) [or possibly without (x64)]
> windbg -z C:\users\ntsoiasue\appdata\local\temp\wer3f91.tmp.mdmp

When windbg starts, it will give you a command prompt...

Type the following into that command prompt:

> .sympath+ [path to your VS output folder (eg. "Release").
             That is, somewhere with a .pdb file for your binary]
> .reload -f [name of your binary]
> k

This will give you a stack trace of the crash.

By the way. Windbg is a pretty good tool and worth getting to know.

It happened with me also. I had to do a full uninstall of vc++. Reboot your machine and install again.It worked for me.

Have you tried doing a full rebuild? Maybe manually removing all intermediate and output files?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM