In win compile from command line
-
wrote on 21 Dec 2023, 08:27 last edited by
Hi!
I using win 10, MSCV2019, qmake. I can compile project from QtCreator.
How compile project in command line?
I can create MakefileC:/Qt/5.15.2/msvc2019_64/bin/qmake.exe C:\QtProjects\qsingleteleshell\BTeleShell-ui.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"
What need do next?
It's return much errors:C:\Qt\Tools\QtCreator\bin\jom\jom.exe
-
Hi!
I using win 10, MSCV2019, qmake. I can compile project from QtCreator.
How compile project in command line?
I can create MakefileC:/Qt/5.15.2/msvc2019_64/bin/qmake.exe C:\QtProjects\qsingleteleshell\BTeleShell-ui.pro -spec win32-msvc "CONFIG+=debug" "CONFIG+=qml_debug"
What need do next?
It's return much errors:C:\Qt\Tools\QtCreator\bin\jom\jom.exe
-
wrote on 21 Dec 2023, 08:36 last edited by Bonnie
Did you set enviroments for msvc and qt?
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
-
Did you set enviroments for msvc and qt?
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
wrote on 21 Dec 2023, 08:54 last edited by@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?
-
@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?
@Mihaill All you need to do after calling qmake is to call make or jom
-
wrote on 21 Dec 2023, 09:05 last edited by
@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
-
@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
@Mihaill Then the build fails I guess. Any errors?
-
wrote on 21 Dec 2023, 10:29 last edited by
@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"
-
@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"
@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.
-
@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.
wrote on 21 Dec 2023, 10:59 last edited by@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?
-
@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?
@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.
-
@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?
@Mihaill "If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio."
-
@Mihaill "If you want 64bit app build from the "x64 Native Tools Command Prompt" of Visual Studio."
-
@Mihaill Then use what was suggested here...
-
wrote on 21 Dec 2023, 11:25 last edited by
-
@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
-
@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
wrote on 21 Dec 2023, 13:38 last edited by@Chris-Kawa I try using
In project mutch subproject and now builded only unit test. How builded all subprojects? -
@Chris-Kawa I try using
In project mutch subproject and now builded only unit test. How builded all subprojects?wrote on 21 Dec 2023, 14:05 last edited byx64 Native Tools Command Prompt help me. Thank all guys!
-
1/18