17

I added the bin directory of the VS2010 (not SP1) C++ compiler to my PATH variable on Windows XP. When i try to run it, it tells me that a DLL was not found. I added this line to my PATH:

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin;

Update: it still fails when I cd to the bin directory above, and then run the compiler

screenshot

Can you help me out?

Jason
  • 11,263
  • 21
  • 87
  • 181
Tim
  • 834
  • 2
  • 12
  • 31
  • 7
    Note: in most message boxes you can press Ctrl-C to get the text of the message box onto the clipboard - that way you don't have to go through the trouble of posting an image. – Michael Burr Jun 25 '11 at 08:42
  • @Michael Burr Thanks, will remember that ;) – Tim Jun 25 '11 at 08:44

5 Answers5

34

Run the VS command prompt shortcut or the batch file it points to, such as:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

to set up an appropriate environment including the path.

By the way, mspdb100.dll lives in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE. But run the shortcut/batch file anyway - it does more than set up the correct path.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
7

add Microsoft Visual Studio 10.0\Common7\IDE to your Path variable, than close cmd prompt and open it. now it will work.

1

Running the VS command prompt takes care of setting up the environment. Also, ensure that you are running the command prompt as an admin.

Coder
  • 11
  • 2
0

Installing Visual Studio 2010 SP1 C++ Compiler Setup fixed this issue for me. Visual Studio 2010 SP1 C++ Compiler install

arm
  • 117
  • 1
  • 3
  • 10
0

I faced the same issue when I tried to run a 32 bit exe I built, on a 64 bit machine.

"mspdb100.dll couldn't be found by cl.exe "

Visual Studio 2010(the version I currently use) builds a 32 bit exe by Default.To create a 64 bit executable, just change the setting from Win32 to x64 in the dropdown box at the top of VS and build.This will build for you a 64 bit executable and solve your problem.

dhara
  • 41
  • 1
  • 5