MS C++ 2010 and mspdb100.dll

70,136

Solution 1

try running path\to\VC\bin\vcvars32.bat from within your current shell first. This should ensure your command-line setup will match the IDE-setup.

This is not a permanent fix -- you need to do it every time you launch a new shell.

You could probably also find some way to add everything that's in that .bat permanently to the environment variables, but.... like you asked, why the heck doesn't the MS install do that already?

Solution 2

Add Microsoft Visual Studio 10.0\Common7\IDE to your path, and this issue will not exist any more. You will be able to build without running this silly batch file every time.

Solution 3

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?

Solution 4

I met same error,it is because we installed a vs2010 x86 version to a x64 system...

Open two folders:

C:\Windows\Microsoft.NET\Framework\v4.0.30319

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

You will find two cvtres.exe. Righ click, select Properties, then Details. Delete the older version, and cmake will work well. I hope this may help you.

Thanks to "zhoudongao" @ http://bbs.csdn.net/topics/390121452?page=1#post-394768226.

Solution 5

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!

Share:
70,136
zildjohn01
Author by

zildjohn01

Updated on July 08, 2022

Comments

  • zildjohn01
    zildjohn01 almost 2 years

    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. When running either one from the command line, I get an error.

    No problem, I located the DLL and copied it to the directory. Now the compiler works fine, but the linker dies.

    I could solve the problem by adding "%VS10%\Common7\IDE" to my PATH, but for various reasons (performance, system purity, OCD, etc), I don't want to do that. Why is this setup so touchy, and is there anything else I can do to solve it?