The g++'s -g option equivalent to VS2010 cl compiler?
问题 With g++ with -g option, I can use gdb for debugging purposes. What's the equivalent to this option with Visual Studio 2010 cl.exe compiler? This page has different libraries (debug/release) for linking. If I compile with debugging option with cl.exe, do I have to use the corresponding library linking options (/MD/MT vs /MDd/MTd)? 回答1: There are a few separate pieces to this question: how to tell the compiler/linker to generate and preserve "debug information" (mapping between source code and