views:

941

answers:

2

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 the following error:

formidable error

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

even worse

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?

+3  A: 

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?

Michael Paulukonis
A: 

OtherMichael - thanks that worked for me. Although, I had to call vcvars32.bat that is located in the bin folder, which is of course what you meant, but keyboard was trickier this time. I'm just clearing it out because it took me a minute to figure out that a slash got away from your Answer ;)

Marek
forgot the slash, somehow. updated.
Michael Paulukonis