MS C++ 2010 and mspdb100.dll

Visual StudioVisual Studio-2010Visual C++DependenciesDll

Visual Studio Problem Overview


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?

Visual Studio Solutions


Solution 1 - Visual Studio

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 - Visual Studio

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 - Visual Studio

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 - Visual Studio

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!

Solution 5 - Visual Studio

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 6 - Visual Studio

Maybe it will help somebody...

I solved this problem by adding

PATH += %PATH_TO_VS_IN_YOUR_SYSTEM%/Common7/IDE;

to nvcc.profile.

Of course, %PATH_TO_VS_IN_YOUR_SYSTEM% is actual path to Visual Studio in your system.

Solution 7 - Visual Studio

Old, but maybe still valid:

For me "C:\Windows\System32" somehow got missing from the PATH variable.

Adding the missing folder to the path solved this error. See also https://stackoverflow.com/questions/3461275/vs2010-command-prompt-gives-error-cannot-determine-the-location-of-the-vs-comm

Solution 8 - Visual Studio

if you try to run the tools from the windows cmd.exe directly then you need to set the environments by running the vcvars32.bat file which will set the environment for you. instead you can run the visual studio command prompt which will run vcvars32.bat automatically. if you still have the problem then it's definitely the famous path variable problem.

make sure the "path" variable in the environment has the "c:\windows\system32" value added to it , because the .bat file will need it to configure the VC tools.

this problem and the like usually happen because of installing many development platforms on the machine which might probably change the path variable.

check this.. https://schrievkrom.wordpress.com/2011/01/25/error-cannot-determine-the-location-of-the-vs-common-tools-folder/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionzildjohn01View Question on Stackoverflow
Solution 1 - Visual StudioMichael PaulukonisView Answer on Stackoverflow
Solution 2 - Visual StudiomonokromeView Answer on Stackoverflow
Solution 3 - Visual StudioLokMacView Answer on Stackoverflow
Solution 4 - Visual StudioquagsView Answer on Stackoverflow
Solution 5 - Visual StudioZhang TengView Answer on Stackoverflow
Solution 6 - Visual StudioavtomatonView Answer on Stackoverflow
Solution 7 - Visual StudioOliver ZendelView Answer on Stackoverflow
Solution 8 - Visual Studiothe accountantView Answer on Stackoverflow