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. Wh
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.
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/
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?
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 VS2010 command prompt gives error : Cannot determine the location of the VS Common Tools folder
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.
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.