vs2013-Error 2 error LNK1158: cannot run 'rc.exe'
时间: 2024-05-27 18:14:34 浏览: 147
解决报错LNK1158 cannot run 'rc.exe'
5星 · 资源好评率100%
The error message "error LNK1158: cannot run 'rc.exe'" indicates that the linker is unable to run the resource compiler (rc.exe) that is required to build the project. This error can occur due to several reasons, including:
1. The rc.exe file is missing or corrupted.
2. The path to the rc.exe file is not set correctly.
3. The system environment variables are not set up correctly.
To resolve this error, you can try the following steps:
1. Check if the rc.exe file is present in the correct location. The rc.exe file is usually located in the "C:\Program Files (x86)\Windows Kits\10\bin\<version>\x86" folder, where "<version>" is the version of the Windows SDK installed on your system. If the file is missing or corrupted, you can reinstall the Windows SDK to fix the issue.
2. Check if the path to the rc.exe file is set correctly. To do this, open the Visual Studio Command Prompt and type "rc.exe" to see if the command is recognized. If not, you may need to add the path to the rc.exe file to the system PATH environment variable.
3. Check if the system environment variables are set up correctly. Make sure that the "INCLUDE" and "LIB" environment variables are set to the correct paths for the Windows SDK installed on your system. You can check this by opening the "Environment Variables" dialog box in the System Properties control panel.
Once you have resolved the issue, try rebuilding the project to see if the error is resolved.
阅读全文