Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. LNK1158: cannot run 'rc.exe'
Forum Updated to NodeBB v4.3 + New Features

LNK1158: cannot run 'rc.exe'

Scheduled Pinned Locked Moved Solved Installation and Deployment
16 Posts 9 Posters 53.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z zzzhhhzzzhhh

    Yes, that's the problem. I added "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64" into the path variable and now Qt builds correctly. Thank you very much for your help!

    Pablo J. RoginaP Offline
    Pablo J. RoginaP Offline
    Pablo J. Rogina
    wrote on last edited by
    #4

    @zzzhhhzzzhhh if your issue is solved, please don't forget to mark your post as such. Thanks.

    Upvote the answer(s) that helped you solve the issue
    Use "Topic Tools" button to mark your post as Solved
    Add screenshots via postimage.org
    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rmam
      wrote on last edited by
      #5

      @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.HilkJ 1 Reply Last reply
      0
      • R rmam

        @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.HilkJ Online
        J.HilkJ Online
        J.Hilk
        Moderators
        wrote on last edited by
        #6

        hi @rmam ,
        you're welcome :)

        Have a look at this topic
        QtCreator Build Environment Config File

        In 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.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        3
        • D Offline
          D Offline
          D8vLoper
          wrote on last edited by
          #7

          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

          1 Reply Last reply
          5
          • K Offline
            K Offline
            kamalberahal
            wrote on last edited by
            #8

            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

            jsulmJ 1 Reply Last reply
            0
            • K kamalberahal

              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

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #9

              @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.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              3
              • K Offline
                K Offline
                kamalberahal
                wrote on last edited by
                #10

                Yes sorry that's what I meant. Thanks a lot, I have found ir

                R 1 Reply Last reply
                2
                • S Offline
                  S Offline
                  stoplight
                  wrote on last edited by
                  #11

                  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.

                  jsulmJ 1 Reply Last reply
                  0
                  • S stoplight

                    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.

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    @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.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • K kamalberahal

                      Yes sorry that's what I meant. Thanks a lot, I have found ir

                      R Offline
                      R Offline
                      Ripegas
                      wrote on last edited by
                      #13
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Ripegas
                        wrote on last edited by Ripegas
                        #14

                        I cannot find Build Environment settings , can you send me photo please, where I can find it
                        Thank you

                        jsulmJ 1 Reply Last reply
                        0
                        • R Ripegas

                          I cannot find Build Environment settings , can you send me photo please, where I can find it
                          Thank you

                          jsulmJ Online
                          jsulmJ Online
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #15

                          @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"...

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          R 1 Reply Last reply
                          2
                          • jsulmJ jsulm

                            @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"...

                            R Offline
                            R Offline
                            Ripegas
                            wrote on last edited by
                            #16

                            @jsulm Thank you, I have found it

                            1 Reply Last reply
                            1

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved