MS C++ 2010 and mspdb100.dll

前端 未结 8 580
庸人自扰
庸人自扰 2020-12-13 01:31

Microsoft\'s C++ compiler and linker seem to have an odd relationship with mspdb100.dll. When run from the IDE, of course, the compiler and linker work fine. Wh

相关标签:
8条回答
  • 2020-12-13 02:16

    I noticed when I installed Microsoft Visual Studio 2010 Express that under the "Microsoft Visual Studio 2010 Express" folder in the Start Menu, there is a link to "Visual Studio Command Prompt (2010)", which sets up all the necessary environment variables when opened. That way you shouldn't have to edit you PATH variable.

    This shortcut runs the following:

    %comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86

    If it's not convenient to use the shortcut, perhaps you could learn something of use from investigating what this .bat file does?

    0 讨论(0)
  • 2020-12-13 02:18

    I know this is a bit dated but if anyone's looking for a way to get compiler running from command line; here's what I did to get it running.

    I'm using Win7 32bit and Visual Studio 2010. I created a small batch file in C:\Windows. open cmd prompt at C:\Windows as admin, then type the following:

    copy con cl.bat
    
    @"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32" %1 %2 %3 %4 %5 %6
    @"C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\cl" %1 %2 %3 %4 %5 %6
    

    then press f6 and hit enter again.

    Obviously the path you will use is the install path to where you installed Visual Studio.

    You now have working command line compiler from any location or directory in windows. To test this go to desktop and open cmd prompt as admin; I prefer to use Ctrl+Shift and right click then choose open command prompt here. At command prompt type "cl" (without quotes) and hit enter. you will see a message "Setting enviroment for using Microsoft Visual Studio 2010 x86 tools"

    type "cl" and hit enter again and you will get your compiler info. you're all set to compile.

    enjoy!

    0 讨论(0)
提交回复
热议问题