Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can not build application msvc2017, Qt 5.10.1, Qt creator 4.8.1
QtWS25 Last Chance

Can not build application msvc2017, Qt 5.10.1, Qt creator 4.8.1

Scheduled Pinned Locked Moved Solved General and Desktop
17 Posts 4 Posters 4.7k Views
  • 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.
  • U Offline
    U Offline
    Umbaman
    wrote on 12 Feb 2019, 16:01 last edited by
    #1

    When I try to build an application in qt Creator I get the following

    17:50:31: Running steps for project qtCameraScannerToWindows ...
    17:50:31: Starting: "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" "C:\Users\xxxxx\source\gitRepo\qtCameraScannerToWindows - Copy\qtCameraScannerToWindows .pro" "CONFIG+=debug" "CONFIG+=qml_debug"
    17:50:33: The process "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" exited normally.
    17:50:33: Starting: "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" -f C:/Users/xxxxx/source/gitRepo/build-qtCameraScannerToWindows - Copy_Qt_5_10_1_MSVC2017_64bit-Debug/Makefile qmake_all
    Usage: C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe [mode] [options] [files]
    
    QMake has two modes, one mode for generating project files based on
    some heuristics, and the other for generating makefiles. Normally you
    shouldn't need to specify a mode, as makefile generation is the default
    mode for qmake, but you may use this to test qmake on an existing project
    <some help text here and then>
    ***Unknown option -f
    17:50:33: The process "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" exited with code 1.
    Error while building/deploying project qtCameraScannerToWindows (kit: Desktop Qt 5.10.1 MSVC2017 64bit)
    When executing step "qmake"
    

    This is my kit
    1_1549987118278_kit.JPG 0_1549987118276_compilers.JPG

    Any guesses of what might be going wrong?
    My project compiles cleanly in Visual Studio with QT for VS Tools

    A 1 Reply Last reply 12 Feb 2019, 20:27
    0
    • U Umbaman
      12 Feb 2019, 16:01

      When I try to build an application in qt Creator I get the following

      17:50:31: Running steps for project qtCameraScannerToWindows ...
      17:50:31: Starting: "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" "C:\Users\xxxxx\source\gitRepo\qtCameraScannerToWindows - Copy\qtCameraScannerToWindows .pro" "CONFIG+=debug" "CONFIG+=qml_debug"
      17:50:33: The process "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" exited normally.
      17:50:33: Starting: "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" -f C:/Users/xxxxx/source/gitRepo/build-qtCameraScannerToWindows - Copy_Qt_5_10_1_MSVC2017_64bit-Debug/Makefile qmake_all
      Usage: C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe [mode] [options] [files]
      
      QMake has two modes, one mode for generating project files based on
      some heuristics, and the other for generating makefiles. Normally you
      shouldn't need to specify a mode, as makefile generation is the default
      mode for qmake, but you may use this to test qmake on an existing project
      <some help text here and then>
      ***Unknown option -f
      17:50:33: The process "C:\Qt\5.10.1\msvc2017_64\bin\qmake.exe" exited with code 1.
      Error while building/deploying project qtCameraScannerToWindows (kit: Desktop Qt 5.10.1 MSVC2017 64bit)
      When executing step "qmake"
      

      This is my kit
      1_1549987118278_kit.JPG 0_1549987118276_compilers.JPG

      Any guesses of what might be going wrong?
      My project compiles cleanly in Visual Studio with QT for VS Tools

      A Offline
      A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on 12 Feb 2019, 20:27 last edited by
      #2

      @Umbaman your MSVC installations is faulty.

      You cannot set up MSVC compiler manually, it must be auto detected. did you install MSVC at the default location?

      Qt has to stay free or it will die.

      U 1 Reply Last reply 13 Feb 2019, 06:51
      2
      • A aha_1980
        12 Feb 2019, 20:27

        @Umbaman your MSVC installations is faulty.

        You cannot set up MSVC compiler manually, it must be auto detected. did you install MSVC at the default location?

        U Offline
        U Offline
        Umbaman
        wrote on 13 Feb 2019, 06:51 last edited by Umbaman
        #3

        @aha_1980 Yes I did!
        I'm trying for 2 days to get the compiler autodetected by removing and reinstalling qt several times and installing whatever I thought was relevant through visual studio installer.
        When installing visual studio professional I just let the visual studio installer to do its job, I didn't change anything.
        As I final solution I set it manually

        A J 2 Replies Last reply 13 Feb 2019, 07:08
        0
        • U Umbaman
          13 Feb 2019, 06:51

          @aha_1980 Yes I did!
          I'm trying for 2 days to get the compiler autodetected by removing and reinstalling qt several times and installing whatever I thought was relevant through visual studio installer.
          When installing visual studio professional I just let the visual studio installer to do its job, I didn't change anything.
          As I final solution I set it manually

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 13 Feb 2019, 07:08 last edited by
          #4

          @Umbaman

          • Which Windows version is that exactly?
          • Do you have any anti-virus running?

          Qt Creator needs the vcvarsXXX.bat file the detect the compiler. Further, this file does set some environment variables, otherwise the compiler will not work. We have seen some problems with executing this batch file in the past, but things have improved in the latest Creator versions (4.7, 4.8).

          That makes me puzzle what's wrong on your system...

          Qt has to stay free or it will die.

          1 Reply Last reply
          2
          • U Umbaman
            13 Feb 2019, 06:51

            @aha_1980 Yes I did!
            I'm trying for 2 days to get the compiler autodetected by removing and reinstalling qt several times and installing whatever I thought was relevant through visual studio installer.
            When installing visual studio professional I just let the visual studio installer to do its job, I didn't change anything.
            As I final solution I set it manually

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 13 Feb 2019, 07:20 last edited by
            #5

            @Umbaman said in Can not build application msvc2017, Qt 5.10.1, Qt creator 4.8.1:

            When installing visual studio professional I just let the visual studio installer to do its job, I didn't change anything.

            I think this is the problem. By default C++ part is not installed, you need to select it explicitly.

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

            1 Reply Last reply
            3
            • U Offline
              U Offline
              Umbaman
              wrote on 13 Feb 2019, 08:11 last edited by
              #6

              Thank you both for the replies

              @aha_1980

              0_1550045223510_Windows Version.JPG

              1. Windows Defender is used as antivirus

              2. This is where all vcvars files are

                C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build

              @jsulm

              This is what I have installed
              0_1550045473137_visual Studio Desktop development with C++.JPG
              0_1550045460703_visual Studio individual components.JPG

              U 1 Reply Last reply 13 Feb 2019, 13:50
              0
              • U Umbaman
                13 Feb 2019, 08:11

                Thank you both for the replies

                @aha_1980

                0_1550045223510_Windows Version.JPG

                1. Windows Defender is used as antivirus

                2. This is where all vcvars files are

                  C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build

                @jsulm

                This is what I have installed
                0_1550045473137_visual Studio Desktop development with C++.JPG
                0_1550045460703_visual Studio individual components.JPG

                U Offline
                U Offline
                Umbaman
                wrote on 13 Feb 2019, 13:50 last edited by
                #7

                Do I need to run vcvars manually?

                A 1 Reply Last reply 13 Feb 2019, 15:02
                0
                • U Umbaman
                  13 Feb 2019, 13:50

                  Do I need to run vcvars manually?

                  A Offline
                  A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on 13 Feb 2019, 15:02 last edited by
                  #8

                  @Umbaman

                  No, Creator runs it for you. But you can check if you can open a Visual Studio command prompt from the Start Menu. That should exec the same batch file and set up the environment.

                  Does that work without problems?

                  Qt has to stay free or it will die.

                  U 1 Reply Last reply 14 Feb 2019, 07:31
                  1
                  • A aha_1980
                    13 Feb 2019, 15:02

                    @Umbaman

                    No, Creator runs it for you. But you can check if you can open a Visual Studio command prompt from the Start Menu. That should exec the same batch file and set up the environment.

                    Does that work without problems?

                    U Offline
                    U Offline
                    Umbaman
                    wrote on 14 Feb 2019, 07:31 last edited by
                    #9

                    @aha_1980
                    Yes It does.!

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      Jerry.Wilson
                      wrote on 14 Feb 2019, 07:51 last edited by
                      #10

                      After line 3 the qmake exited normally, it start the qmake again with "-f" param, I think it should be jom.exe not qmake.exe, qmake has no option "-f", did you change it?

                      U 1 Reply Last reply 14 Feb 2019, 07:58
                      2
                      • J Jerry.Wilson
                        14 Feb 2019, 07:51

                        After line 3 the qmake exited normally, it start the qmake again with "-f" param, I think it should be jom.exe not qmake.exe, qmake has no option "-f", did you change it?

                        U Offline
                        U Offline
                        Umbaman
                        wrote on 14 Feb 2019, 07:58 last edited by
                        #11

                        @Jerry.Wilson
                        No I didn't! I don't even know how. I wanted to remove the -f option

                        J 1 Reply Last reply 14 Feb 2019, 08:49
                        0
                        • U Umbaman
                          14 Feb 2019, 07:58

                          @Jerry.Wilson
                          No I didn't! I don't even know how. I wanted to remove the -f option

                          J Offline
                          J Offline
                          Jerry.Wilson
                          wrote on 14 Feb 2019, 08:49 last edited by
                          #12

                          @Umbaman
                          Mmm...as I saw in your picture, you choose qmake.exe as your make tool in the Make Path, I think that is the reason. Qmake is not a make tool, use jom.exe and try again.

                          U 1 Reply Last reply 14 Feb 2019, 11:39
                          3
                          • J Jerry.Wilson
                            14 Feb 2019, 08:49

                            @Umbaman
                            Mmm...as I saw in your picture, you choose qmake.exe as your make tool in the Make Path, I think that is the reason. Qmake is not a make tool, use jom.exe and try again.

                            U Offline
                            U Offline
                            Umbaman
                            wrote on 14 Feb 2019, 11:39 last edited by Umbaman
                            #13

                            @Jerry.Wilson hmmm. Something seems to be happening.

                            This is what I am getting now

                            C:\Qt\5.10.1\msvc2017_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
                            

                            Edit:
                            this guy here (https://nnarain.github.io/2017/11/10/Config-issues-with-Qt-and-Visual-Studio.html) nailed it!
                            The corresponding registry key was pointing to the community edition I had, before installing visual studio professional.

                            I can see a few compilers now autodetected, but not a single kit autoconfigured...
                            Manually setting a compiler seems to be working but I cannot compile my project correctly.

                            Example Output

                            :-1: error: LNK1181: cannot open input file 'debug\main.obj'

                            A 1 Reply Last reply 14 Feb 2019, 13:10
                            0
                            • U Umbaman
                              14 Feb 2019, 11:39

                              @Jerry.Wilson hmmm. Something seems to be happening.

                              This is what I am getting now

                              C:\Qt\5.10.1\msvc2017_64\include\QtCore/qglobal.h(45): fatal error C1083: Cannot open include file: 'type_traits': No such file or directory
                              

                              Edit:
                              this guy here (https://nnarain.github.io/2017/11/10/Config-issues-with-Qt-and-Visual-Studio.html) nailed it!
                              The corresponding registry key was pointing to the community edition I had, before installing visual studio professional.

                              I can see a few compilers now autodetected, but not a single kit autoconfigured...
                              Manually setting a compiler seems to be working but I cannot compile my project correctly.

                              Example Output

                              :-1: error: LNK1181: cannot open input file 'debug\main.obj'

                              A Offline
                              A Offline
                              aha_1980
                              Lifetime Qt Champion
                              wrote on 14 Feb 2019, 13:10 last edited by aha_1980
                              #14

                              @Umbaman,

                              good, it seems we get forward :)

                              • Can you show your compilers and kits screens again now?
                              • Can you check if a newly created project compiles?
                              • If not, please post the complete compile output.

                              Regards

                              Qt has to stay free or it will die.

                              1 Reply Last reply
                              2
                              • U Offline
                                U Offline
                                Umbaman
                                wrote on 14 Feb 2019, 13:51 last edited by
                                #15
                                1. Compilers

                                0_1550151994648_newCompilers.JPG

                                Kits
                                0_1550151918677_new Kits.JPG

                                1. A new project compiles, runs and can be debugged successfully using the Desktop Kit. I was getting the error mentioned due to white spaces in my path.

                                As for the UWP kit I get the following output

                                :-1: warning: winrt_manifest_install.path is not defined: install target not created
                                

                                therefore nothing happens when I run the project.

                                A 1 Reply Last reply 14 Feb 2019, 14:25
                                0
                                • U Umbaman
                                  14 Feb 2019, 13:51
                                  1. Compilers

                                  0_1550151994648_newCompilers.JPG

                                  Kits
                                  0_1550151918677_new Kits.JPG

                                  1. A new project compiles, runs and can be debugged successfully using the Desktop Kit. I was getting the error mentioned due to white spaces in my path.

                                  As for the UWP kit I get the following output

                                  :-1: warning: winrt_manifest_install.path is not defined: install target not created
                                  

                                  therefore nothing happens when I run the project.

                                  A Offline
                                  A Offline
                                  aha_1980
                                  Lifetime Qt Champion
                                  wrote on 14 Feb 2019, 14:25 last edited by aha_1980
                                  #16

                                  @Umbaman

                                  Do you need UWP/WinRT? I'm out here, I have never used it...

                                  Qt has to stay free or it will die.

                                  1 Reply Last reply
                                  1
                                  • U Offline
                                    U Offline
                                    Umbaman
                                    wrote on 14 Feb 2019, 14:38 last edited by
                                    #17

                                    Yes I do.
                                    I need to develop apps for Windows 10 IoT.

                                    1 Reply Last reply
                                    0

                                    3/17

                                    13 Feb 2019, 06:51

                                    14 unread
                                    • Login

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