Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

manually build debug from cmd or terminal consoles..



  • Hi, i'm giving a try to write my project using a very simple with no syntax neither intellisense helpers ide as vim or nano (or even notepad), what are the steps to build just the same as i did on Qt Creator?

    This is what i do:

    1. go to project source folder
    2. execute : qmake
    3. execute : make
    4. what's next?.

    Thanks


  • Moderators

    That should be it. Make will run the compiler and linker and you should have an executable ready to run, so...
    4. run the app



  • alright thanks!..
    just curious about make process.. it taking so much time...

    the output is :

    C:\Qt\5.15.2\mingw81_32\bin\qmake -o Makefile S_Elearning.pro
    C:\Qt\5.15.2\mingw81_32\bin\qmake -o Makefile S_Elearning.pro
    C:\Qt\5.15.2\mingw81_32\bin\qmake -o Makefile S_Elearning.pro
    C:\Qt\5.15.2\mingw81_32\bin\qmake -o Makefile S_Elearning.pro
    ..
    ..
    repeating all this all the time.. right now it alive for 15 minutes..
    

    LATER:
    it has finished building!.. but i got some errors on compilation,

    #include <QSqlDatabase>   fatal error: No such file or directory
    

    the same happens with QDialog and other files...
    may I need to reconfigure some paths?..

    I'm using Windows 10 - X64

    MORE LATER:
    I managed to compile it, needed to add project filename to step 2.
    Thanks!



  • @U7Development said in manually build debug from cmd or terminal consoles..:

    I managed to compile it,

    if your issue is solved please don't forget to mark your post as such!



  • @U7Development I also recently undertook an effort to compile a qmake project without an IDE (i.e. without Visual Studio and without Qt Creator).

    As you probably know, this is more than just a matter of any personal taste (or personal distaste) for any particular IDE. Rather, a scripted and repeatable build is essential for continuous integration!

    Congratulations on getting it working with mingw.

    In my case, I used the MSVC toolchain (in place of mingw). For anyone else in the MSVC situation, I think one extra step is needed in order to succeed at building in a terminal window. The step is to call vcvars64.bat to select the MSVC toolchain.

    From a cmd.exe window, vcvars64.bat can be used to select the MSVC toolchain.  From thereafter, calling qmake using the full path to the 'msvc2019_64' (or similar) edition of qmake is the key to building with the right "kit". (Qt Creator IDE terminology speaks in terms of "kits".)

    Since Windows development has historically been far less command-line oriented than Linux (or even Mac) development, I just want to give this forum thread even more love and continue to "sprinkle the news around" that a command-line MSVC build is possible. My applause to @U7Development for the same!


Log in to reply