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. In win compile from command line
Forum Updated to NodeBB v4.3 + New Features

In win compile from command line

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 5 Posters 910 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.
  • M Mihaill

    @Bonnie said in In win compile from command line:

    You should:

    Start from VS2019 start menu "x64 Native Tools Command Prompt"
    In the above command prompt, run "C:\Qt\5.15.2\msvc2019_64\bin\qtenv2.bat"

    Then CD to your build folder and run qmake and nmake/jom

    Thanks. It's help me generate moc files. What need doing now for generate .exe?

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #5

    @Mihaill All you need to do after calling qmake is to call make or jom

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

    M 1 Reply Last reply
    1
    • jsulmJ jsulm

      @Mihaill All you need to do after calling qmake is to call make or jom

      M Offline
      M Offline
      Mihaill
      wrote on last edited by
      #6

      @jsulm said in In win compile from command line:

      @Mihaill All you need to do after calling qmake is to call make or jom

      I call jom after qmake, jom generate moc file, but not create .exe

      jsulmJ 1 Reply Last reply
      0
      • M Mihaill

        @jsulm said in In win compile from command line:

        @Mihaill All you need to do after calling qmake is to call make or jom

        I call jom after qmake, jom generate moc file, but not create .exe

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #7

        @Mihaill Then the build fails I guess. Any errors?

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

        M 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Mihaill Then the build fails I guess. Any errors?

          M Offline
          M Offline
          Mihaill
          wrote on last edited by
          #8

          @jsulm said in In win compile from command line:

          errors

          C:\Qt\5.15.2\msvc2019_64\lib\qtmaind.lib warning LNK4272: Library computer type "x64" conflicts with target computer type "x86"

          Chris KawaC 1 Reply Last reply
          0
          • M Mihaill

            @jsulm said in In win compile from command line:

            errors

            C:\Qt\5.15.2\msvc2019_64\lib\qtmaind.lib warning LNK4272: Library computer type "x64" conflicts with target computer type "x86"

            Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #9

            @Mihaill You are building a 32bit app and linking to 64bit Qt. That won't work. If you want 32bit app use 32bit Qt. If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio.

            M 1 Reply Last reply
            2
            • Chris KawaC Chris Kawa

              @Mihaill You are building a 32bit app and linking to 64bit Qt. That won't work. If you want 32bit app use 32bit Qt. If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio.

              M Offline
              M Offline
              Mihaill
              wrote on last edited by
              #10

              @Chris-Kawa But i'm using 64bit qmake

               C:/Qt/5.15.2/msvc2019_64/bin/qmake.exe C:\QtProjects\qsingleteleshell\BTeleShell-ui.pro
              

              and after only

              C:\Qt\Tools\QtCreator\bin\jom\jom.exe
              

              Where is usinf 32bit?

              Christian EhrlicherC jsulmJ 2 Replies Last reply
              0
              • M Mihaill

                @Chris-Kawa But i'm using 64bit qmake

                 C:/Qt/5.15.2/msvc2019_64/bin/qmake.exe C:\QtProjects\qsingleteleshell\BTeleShell-ui.pro
                

                and after only

                C:\Qt\Tools\QtCreator\bin\jom\jom.exe
                

                Where is usinf 32bit?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #11

                @Mihaill said in In win compile from command line:

                Where is usinf 32bit?

                As @Chris-Kawa already said - your compiler is a compiler to create 32bit executables - setup the correct one.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • M Mihaill

                  @Chris-Kawa But i'm using 64bit qmake

                   C:/Qt/5.15.2/msvc2019_64/bin/qmake.exe C:\QtProjects\qsingleteleshell\BTeleShell-ui.pro
                  

                  and after only

                  C:\Qt\Tools\QtCreator\bin\jom\jom.exe
                  

                  Where is usinf 32bit?

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

                  @Mihaill "If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio."

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

                  M 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Mihaill "If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio."

                    M Offline
                    M Offline
                    Mihaill
                    wrote on last edited by
                    #13

                    @jsulm I'm using 5f107401-aa1f-49d9-bdd5-80917acfa06e-image.png
                    but it's not help me

                    jsulmJ 1 Reply Last reply
                    0
                    • M Mihaill

                      @jsulm I'm using 5f107401-aa1f-49d9-bdd5-80917acfa06e-image.png
                      but it's not help me

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #14

                      @Mihaill Then use what was suggested here...

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

                      M 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Mihaill Then use what was suggested here...

                        M Offline
                        M Offline
                        Mihaill
                        wrote on last edited by
                        #15

                        @jsulm said in In win compile from command line:

                        here...

                        no link

                        Chris KawaC 1 Reply Last reply
                        0
                        • M Mihaill

                          @jsulm said in In win compile from command line:

                          here...

                          no link

                          Chris KawaC Offline
                          Chris KawaC Offline
                          Chris Kawa
                          Lifetime Qt Champion
                          wrote on last edited by Chris Kawa
                          #16

                          @Mihaill If you want to solve your problem you're gonna have to start doing what we say. "Developer Command Prompt for VS 2022" is the wrong one for your case. It sets up a 32 bit compiler.

                          It was already said by @Bonnie and me - to develop 64bit apps you need "x64 Native Tools Command Prompt".

                          Open your start menu, scroll down to Visual Studio, open "x64 Native Tools Command Prompt". Not "Developer Command Prompt", not "x64_x86 Cross Tools Command Prompt". Not any other. "x64 Native Tools Command Prompt" is the one you need

                          M 1 Reply Last reply
                          3
                          • Chris KawaC Chris Kawa

                            @Mihaill If you want to solve your problem you're gonna have to start doing what we say. "Developer Command Prompt for VS 2022" is the wrong one for your case. It sets up a 32 bit compiler.

                            It was already said by @Bonnie and me - to develop 64bit apps you need "x64 Native Tools Command Prompt".

                            Open your start menu, scroll down to Visual Studio, open "x64 Native Tools Command Prompt". Not "Developer Command Prompt", not "x64_x86 Cross Tools Command Prompt". Not any other. "x64 Native Tools Command Prompt" is the one you need

                            M Offline
                            M Offline
                            Mihaill
                            wrote on last edited by
                            #17

                            @Chris-Kawa I try using 77a03c5a-e8d0-4a4b-9164-70a654ea56fa-image.png
                            In project mutch subproject and now builded only unit test. How builded all subprojects?

                            M 1 Reply Last reply
                            0
                            • M Mihaill

                              @Chris-Kawa I try using 77a03c5a-e8d0-4a4b-9164-70a654ea56fa-image.png
                              In project mutch subproject and now builded only unit test. How builded all subprojects?

                              M Offline
                              M Offline
                              Mihaill
                              wrote on last edited by
                              #18

                              x64 Native Tools Command Prompt help me. Thank all guys!

                              1 Reply Last reply
                              0
                              • M Mihaill has marked this topic as solved on

                              • Login

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