Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VC2013 incorrect MSPDB120.DLL

During linking I get this message:

LINK : fatal error LNK1101: incorrect MSPDB120.DLL version; recheck installation of this product

I have seen solutions for similar errors on previous versions of VC2013 but those did not work for me. Those include:

  1. running C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat
  2. adding %VS120COMNTOOLS% environment variable to the PATH environment variable
  3. Reinstall or Repair the installation of MSVC2013 (NOT RECOMMENDED)

The first time I got this error I went ahead with a full reinstall of VC2013. I chose to take this rout because I thought maybe I had screwed up the install by installing older versions of VC after installing VC2013. Although reinstalling worked the first time, I can't recommend doing this. The MS installer seems rather broken and hung up on me on repeated attempts, resulting in the loss of 5+ hours of my life.

What are some other solutions to this problem if the first 2 options do not work?

like image 969
PolyMesh Avatar asked Feb 26 '14 21:02

PolyMesh


2 Answers

Open Task Manager.

Check for the currently running processes mspdbsrv.exe and kill it if it is running and try again. I don't know why this works, but I have to do it every once in a while. The process comes back each time you compile and it seems random whether or not it gets stuck on this step.

Alternatively, if you do not need debug information generated, you can skip this process altogether by setting:

  • Project Properties -> Linker -> Debugging -> Generate Debug Info -> No
like image 70
PolyMesh Avatar answered Oct 17 '22 14:10

PolyMesh


I just had this happen. In my case, I had a statically-linked shared 'helper' lib that was compiled with the cl.exe CRT flags "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE", whereas my target app that linked in this helper lib did not have these set. Once I added these flags to the app's cl.exe flags, all was good.

like image 30
phiis161803 Avatar answered Oct 17 '22 12:10

phiis161803