4

I installed Qt Creator with mingw and msvc2015 binaries. To have the compiler fpr msvc2015 I installed VS 2017 community inkluding support for msvc2015.

However when I try to compile in Qt Creator I get the error

LNK1158 cannot run 'rc.exe'

What went wrong in the installation? Which files do I need to reinstal to fix this?

The PATH in QtCreator contains the folder

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64_x86;
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64;
C:\Program Files (x86)\Windows Kits\10\bin\x64;
C:\Program Files (x86)\Windows Kits\10\bin\x86;

But the rc.exe is only in

C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64
C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86
C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\...
Matthias Pospiech
  • 3,130
  • 18
  • 55
  • 76
  • Maybe this [question](https://stackoverflow.com/questions/14372706/visual-studio-cant-build-due-to-rc-exe) will be helpful – Rhathin Nov 09 '18 at 13:03
  • There are too many rc.exe to copy under `C:\Program Files (x86)\Windows Kits\`. Which is the correct one? I tried to solve it as in the answer. But it did not work. – Matthias Pospiech Nov 09 '18 at 13:09
  • 2
    I added `C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86` to the path in QtCreator and it works now. – Matthias Pospiech Nov 09 '18 at 13:34

1 Answers1

0

I ran to this problem too. this is a compiler file problem which you probably using MSVC... Change your compiler into MinGW if you have added it before from the button above the run button... or if not try starting a new project and add into it

Sajad
  • 1