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. need help in setting Build & Run option after importing an existing project
Forum Updated to NodeBB v4.3 + New Features

need help in setting Build & Run option after importing an existing project

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 1.8k 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.
  • R Offline
    R Offline
    ravi2k18
    wrote on last edited by
    #1

    hi,

    I am importing an existing project downloaded from github. But I could not understand how to set build and run options for that as I have installed several versions of Qt hence Qt creator shows all the available tools in "Auto-detected" but how to make a particulate compiler and qmake active?

    I want to use MSVC 2017 compiler and its qmake. Please see below in snaps.

    3_1547055822866_4.jpg 2_1547055822866_3.jpg 1_1547055822866_2.jpg 0_1547055822865_1.jpg

    Thanks...

    aha_1980A 1 Reply Last reply
    0
    • R ravi2k18

      hi,

      I am importing an existing project downloaded from github. But I could not understand how to set build and run options for that as I have installed several versions of Qt hence Qt creator shows all the available tools in "Auto-detected" but how to make a particulate compiler and qmake active?

      I want to use MSVC 2017 compiler and its qmake. Please see below in snaps.

      3_1547055822866_4.jpg 2_1547055822866_3.jpg 1_1547055822866_2.jpg 0_1547055822865_1.jpg

      Thanks...

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @ravi2k18,

      Creator needs to auto-detect the Visual Studio C++ compiler - you cannot set them up manually.

      • Did you install Visual C++ to the default path?
      • Is there a vcvars*.bat in the Visual Studio installation directory?

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ravi2k18
        wrote on last edited by
        #3

        if we can not install manually then what is manual section in build & run ?

        I have installed VS 2017 community version

                      C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext
        

        What do you mean by installing VS 2017 in default path ? what is default path in my case ?

        I have qt installed in the below path

                C:\Qt\Qt5.12.0
        
        aha_1980A 1 Reply Last reply
        0
        • R ravi2k18

          if we can not install manually then what is manual section in build & run ?

          I have installed VS 2017 community version

                        C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext
          

          What do you mean by installing VS 2017 in default path ? what is default path in my case ?

          I have qt installed in the below path

                  C:\Qt\Qt5.12.0
          
          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @ravi2k18

          • Did you install Visual C++ ? That has to be selected separately during the installation.
          • Did you change the path during the Visual C++ installation or did you keep the defaults?

          Qt has to stay free or it will die.

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

            @aha_1980

            Did you install Visual C++ ?

            I have installed VC++ using MS Visual studio 2015 iso download from Microsoft site.

            Did you change the path during the Visual C++ installation ?
            Yes. While installation I just used the non default path given below

                                       C:\Program Files (x86)\Microsoft Visual Studio\2015
            
            1 Reply Last reply
            0
            • R Offline
              R Offline
              ravi2k18
              wrote on last edited by
              #6

              so I have installed VS 2015 with VC++ and tried to re import the code and configure the build and run settings as shown in below snaps. However still geting some build errors as given below.

              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(173): 'getenv' is not a recognized replace function.
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(175): 'getenv' is not a recognized replace function.
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(196): system(execute) requires one or two arguments.
              Project ERROR: Cannot run compiler 'cl'. Output:
              ===================
              ===================
              Maybe you forgot to setup the environment?
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(240): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
              Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
              Error while parsing file C:\Qt-Workspace\OnvifDiscoveryLib\OnvifDiscoveryLib.pro. Giving up.
              Warnings while parsing QML type information of C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/qml:
              C:\Qt\Qt5.12.0\5.12.0\msvc2017_64\qml\builtins.qmltypes:1:24: Reading only version 1.1 parts.
              C:\Qt\Qt5.12.0\5.12.0\msvc2017_64\qml\builtins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
              
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(173): 'getenv' is not a recognized replace function.
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(175): 'getenv' is not a recognized replace function.
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(196): system(execute) requires one or two arguments.
              Project ERROR: Cannot run compiler 'cl'. Output:
              ===================
              ===================
              Maybe you forgot to setup the environment?
              C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(240): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
              Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
              Error while parsing file C:\Qt-Workspace\OnvifDiscoveryLib\OnvifDiscoveryLib.pro. Giving up.
              

              @aha_1980

              below is the snap of build and run

              0_1547068080683_1.jpg

              0_1547068090740_2.jpg

              0_1547068109765_3.jpg

              0_1547068116635_4.jpg

              0_1547068123419_5.jpg

              0_1547068135776_6.jpg

              aha_1980A 1 Reply Last reply
              0
              • R ravi2k18

                so I have installed VS 2015 with VC++ and tried to re import the code and configure the build and run settings as shown in below snaps. However still geting some build errors as given below.

                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(173): 'getenv' is not a recognized replace function.
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(175): 'getenv' is not a recognized replace function.
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(196): system(execute) requires one or two arguments.
                Project ERROR: Cannot run compiler 'cl'. Output:
                ===================
                ===================
                Maybe you forgot to setup the environment?
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(240): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
                Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
                Error while parsing file C:\Qt-Workspace\OnvifDiscoveryLib\OnvifDiscoveryLib.pro. Giving up.
                Warnings while parsing QML type information of C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/qml:
                C:\Qt\Qt5.12.0\5.12.0\msvc2017_64\qml\builtins.qmltypes:1:24: Reading only version 1.1 parts.
                C:\Qt\Qt5.12.0\5.12.0\msvc2017_64\qml\builtins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
                
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(173): 'getenv' is not a recognized replace function.
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(175): 'getenv' is not a recognized replace function.
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(196): system(execute) requires one or two arguments.
                Project ERROR: Cannot run compiler 'cl'. Output:
                ===================
                ===================
                Maybe you forgot to setup the environment?
                C:/Qt/Qt5.12.0/5.12.0/msvc2017_64/mkspecs/features/toolchain.prf(240): Variable QMAKE_CXX.COMPILER_MACROS is not defined.
                Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set
                Error while parsing file C:\Qt-Workspace\OnvifDiscoveryLib\OnvifDiscoveryLib.pro. Giving up.
                

                @aha_1980

                below is the snap of build and run

                0_1547068080683_1.jpg

                0_1547068090740_2.jpg

                0_1547068109765_3.jpg

                0_1547068116635_4.jpg

                0_1547068123419_5.jpg

                0_1547068135776_6.jpg

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by aha_1980
                #7

                @ravi2k18 as said, you cannot set up the compiler manually. remove that one and use the auto-detected.

                I'm on the mobile now and can hardly read your screen (most of the pic is uninteresting), so I cannot tell you if there is more wrong.

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  ravi2k18
                  wrote on last edited by
                  #8

                  @aha_1980

                  Now I am using automatic kit Desktop Qt 5.12.0 MSVC2017 64bit
                  however while building the project I am getting below err.

                                     File Makefile doesn't exist.
                  

                  why VC++ project will use Makefile here? when has *.pro file.
                  How can I fix this?

                  Thanks....

                  aha_1980A 1 Reply Last reply
                  0
                  • R ravi2k18

                    @aha_1980

                    Now I am using automatic kit Desktop Qt 5.12.0 MSVC2017 64bit
                    however while building the project I am getting below err.

                                       File Makefile doesn't exist.
                    

                    why VC++ project will use Makefile here? when has *.pro file.
                    How can I fix this?

                    Thanks....

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @ravi2k18 qmake generates a makefile, which is processed by nmake/jom.

                    I'd suggest you to create a simple example with the wizard first and see if that compiles.

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    2
                    • R Offline
                      R Offline
                      ravi2k18
                      wrote on last edited by ravi2k18
                      #10

                      @aha_1980

                      when i create new "hello world" project by using empty qmake project template, it runs successfully.
                      However when I try to import the same dir as existing project after deleting generated .pro.user, it gives me

                                       ":-1: error: No rule to make target 'all'.  Stop." 
                      

                      any idea what I am doing wrong in importing the working exciting project here.

                      thanks...

                      aha_1980A 1 Reply Last reply
                      0
                      • R ravi2k18

                        @aha_1980

                        when i create new "hello world" project by using empty qmake project template, it runs successfully.
                        However when I try to import the same dir as existing project after deleting generated .pro.user, it gives me

                                         ":-1: error: No rule to make target 'all'.  Stop." 
                        

                        any idea what I am doing wrong in importing the working exciting project here.

                        thanks...

                        aha_1980A Offline
                        aha_1980A Offline
                        aha_1980
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @ravi2k18 make sure to delete all build artifacts and Makefiles. it should work.

                        Qt has to stay free or it will die.

                        1 Reply Last reply
                        2

                        • Login

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