原文是这样的,某个人在vs2012中想要输出map文件,但是发现map文件输出选项中的/MAPINFO:LINES 报错,从而去寻求帮助。官方给的答复是,改命令在vs2005之后就不支持了,建议换成minidump的方式。
原文如下:
Visual Studio 2012:error LNK1117: syntax error in option 'MAPINFO:LINES'
Hi,
Thanks for posting here.
According to your descrition, you want to turn on MAPINFO:LINES in the visual studio 2012. As far as I know, /MAPINFO:LINES is no longer supported since VS2005.
If you need to use it, you may have a try to find a replacement of it. You can refer to the link below and consider using dbghelp library to do this.
replacement for /mapinofo:lines in Visual Studio 2005
By the way, here is an article describes how minidumps work, how to make your application create them when it crashes, and how to read them back with Visual Studio .NET. It should be helpful for you.
http://www.codeproject.com/Articles/1934/Post-Mortem-Debugging-Your-Application-with-Minidu
Best Regards,
May
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
Marked as answer by May Wang - MSFTMicrosoft contingent staff Tuesday, September 09, 2014 9:40 AM
Monday, September 01, 2014 3:13 AM
Andy,
I would suggest looking at MiniDumpWriteDump() from dbghelp.dll. You can use this to capture the information you're looking for, and then examine minidumps with cdb, ntsd, windbg, or Visual Studio.
A quick sketch of what you want to do is as follows - declare your exception filter function to take LPEXCEPTION_POINTERS, and pass GetExceptionInformation() to it, e.g.:
int MyFilter(LPEXCEPTION_POINTERS lpEP) {...}
__try { ... } __except(MyFilter(GetExceptionPointers())) { ... }
then in MyFilter() you can call a function that uses MiniDumpWriteDump() to write a minidump file that your user's can give to you when they see a failure.
You can then use one of the debuggers with the .pdb for the application to generate a call stack.
Hope this helps.
Mark Lacey
VC++ Development Team
Tuesday, November 29, 2005 9:17 PM
Post-Mortem Debugging Your Application with Minidumps and Visual Studio .NET