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?
You can uninstall the redistributables the same way you uninstall any other program in the Programs and Features control panel app. You can then download and install the latest versions from Microsoft's Download Center.
The Visual C++ Redistributable Packages install runtime components that are required to run C++ applications built with Visual Studio 2012.
Windows does not require Visual C++ Redistributables. They may be needed for some programs you have installed. So please check programs you have and do they need redistributables and what versions. Usually programs' installers have required redistributables inside and install them automatically.
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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With