For studying the Qt book "C++-gui-programming-with-qt-4-2ndedition" I need command prompt of Qt. I've installed Qt 5.3.0 (creator 5.3.0 open source) but don't know where is its command prompt. Is there anyone to help me?
1 Answer
I think what you are seeking is a command prompt with an already setup environment (setting PATH variables for a certain Qt kit).
You can find the appropriate batch file in QTINSTALLPATH/YOURKIT/bin/qtenv2.bat
.
You can e.g. start this batch inside your command shell.
This assumes that your are using a Windows install !
Please be aware that this only sets the environment for Qt ... not your compiler toolchain.
-
I'm using Win 7. The book says: From a command prompt change the directory to "MyProjectName" and then type: Qmake -project. I could to find that file in this path C:\Qt\Qt5.3.0\5.3\mingw482_32\bin. But what to do with that? Inside my command shell!? What is that? Sorry I'm so novice on Qt! PS: I've also installed Qt VS2012 on D:\ drive.– AriaCommented Jun 15, 2014 at 4:33
-
Ok ... i highly recommend that you take a look at the tutorial section of qt-project.org. I do not use the mingw kit but i will give you a brief step by step instruction in a few minutes when i got a coffee :-) Commented Jun 15, 2014 at 8:47
-
1You need to start the command prompt with
cmd
. Now change the directory toC:\Qt\Qt5.3.0\5.3\mingw482_32\bin
(i assume from your comments that this is your path. Now call theqtenv2.bat
. This will setup your path (including your mingw compiler chain path if you installed it along with Qt). Now change to your project folder and try if you can callqmake
andg++
. Don't mix mingw and MVSC (visual studio compiler). These are totally different compilers and toolchains. Qt comes precompiled with different kits for different compilers. Choose the one you like (mingw or VS). Commented Jun 15, 2014 at 9:03 -
1And just as a tip: I assume you are new to c++ programming, since you does not seem to understand the idea of compiler tool chains and so on. You should educate yourself first about the command line (that is pretty awful on Win using
cmd
- but this might be a matter of taste). Then choose a compiler tool chain (mingw of e.g. the MS solution). Make yourself familiar with setting up your environment (command line and IDE). Now - and this is the most important part - learn to program in c++. Without basic c++ knowledge you will never understand the concepts of the Qt framework. Commented Jun 15, 2014 at 9:12
cmd
on Windows, or from a terminal on Linux.