LNK1158: cannot run 'rc.exe'
-
@J-Hilk thank you for finding the fix. I was experiencing the same problem after installing Qt Creator 4.6.2 in Windows and somehow msvc2017 worked fine although msvc2015 failed to find rc.exe.
Having said that, is there a way to automatically configure the compiler to include the right path? Your fix does the trick, but I'm assuming that it requires to tweak each project each time that we intend to do a build with msvc2015.
-
@J-Hilk thank you for finding the fix. I was experiencing the same problem after installing Qt Creator 4.6.2 in Windows and somehow msvc2017 worked fine although msvc2015 failed to find rc.exe.
Having said that, is there a way to automatically configure the compiler to include the right path? Your fix does the trick, but I'm assuming that it requires to tweak each project each time that we intend to do a build with msvc2015.
hi @rmam ,
you're welcome :)Have a look at this topic
QtCreator Build Environment Config FileIn there @aha_1980 had the correct idea/knowledge in how to modify your kits to automatically add folders to your build environment.
But, you'll still have to do it once for each installed Kit.
Greetings.
-
I know this is old but the real reason for the missing rc.exe is a bug in Microsoft SDKs path installation.
Here is a "cleaner" fix : https://stackoverflow.com/questions/43847542/rc-exe-no-longer-found-in-vs-2015-command-prompt -
Hello everyone,
I have the same issue, but I can't find the Build Environment settings in Qt5, can you show me where to find it?
Thanks in advance -
Hello everyone,
I have the same issue, but I can't find the Build Environment settings in Qt5, can you show me where to find it?
Thanks in advance@kamalberahal You mean in QtCreator not Qt5 I guess?
On the left side click on "Projects", select the Kit you're using and go to Build. -
Yes sorry that's what I meant. Thanks a lot, I have found ir
-
Ya, for me it was already in my path. My problem was that I had VS2017 installed, but the qt is by default meant to build for the 2015 version. So just change the build options to the VS2017x64 version.
@stoplight said in LNK1158: cannot run 'rc.exe':
but the qt is by default meant to build for the 2015 version
Newer Qt versions are available for VS2017 as well.
-
Yes sorry that's what I meant. Thanks a lot, I have found ir
-
I cannot find Build Environment settings , can you send me photo please, where I can find it
Thank you -
@Ripegas Open your project in QtCreator. On the left side click on "Projects", then under Build & Run" select the Kit you're using and then "Build". Now, at the bottom you will see "Build Environment"...