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

Error When executing step "qmake"



  • Hello programmers

    I met something strange in my work.
    I have created a database in QT using C++ and SQL.
    Everything worked properly, until I updated to QT v6.
    I don’t remember the previous version (5…).
    When I run the project in 6th version an error appeared repeatedly:

    Could not create directory "D:\work\build-D:workTheDataTheData-Desktop_Qt_6_2_2_MinGW_64_bit-Debug"
    Error while building/deploying project TheData (kit: Desktop Qt 6.2.2 MinGW 64-bit)
    When executing step "qmake"

    When I tried to created a new project using 6th version of QT everything worked properly, at least in the first steps (!!!)

    The compiler path is “C:\Qt\Tools\mingw900_64\bin\g++.exe”
    The default kit is “Desktop Qt 6.2.2 MinGW 64-bit

    I think it is not a matter of code, but if you would like to take a glance in my code I will upload it.

    Thanks in advance
    John

    My kits

    Kits.jpg

    My path
    Path.jpg


  • Lifetime Qt Champion

    Fix your kits so the yellow and red icons disappear and then use the correct kit to configure your app.



  • I thank you for your prompt answer. Unfortunately, when I tried some changes using the suggested options, the result was just the same.

    For example, in the C++ compiler, the option “MinGQ 9.0.0 64-bit for C++” and the the option "MINGW" lead to no change.

    May be I skipped important options during installation.

    Thanks anyway


  • Lifetime Qt Champion

    Hi,

    Did you install MinGW through the online installer as well ?



  • Yes, as you wrote.
    The installation folder is "C:\MinGW"



  • What makes me wonder above all is why the compiles works for new projects and does not work for the old one. Truly strange.



  • @SGaist said in Error When executing step "qmake":

    MinGW

    Thanks to all.
    May be I go back to a previous version.



  • This post is deleted!


  • John_Thess less than a minute ago

    Unfortunately, dear programmers, nothing works.
    Might someone upload images with the right settings for compilers and kits?
    I use Qt Creator 6.0.1 Based on Qt 6.2.2 (MSVC 2019, 64 bit)

    I upload my current settingsImage.jpg
    Image2.jpg
    Image3.jpg


  • Lifetime Qt Champion

    @John_Thess said in Error When executing step "qmake":

    Could not create directory "D:\work\build-D:workTheDataTheData-Desktop_Qt_6_2_2_MinGW_64_bit-Debug"

    Is it really the path you are getting ?
    Did you already try to nuke the .pro.user file in your project directory and configure it again ?



  • @SGaist The project, I created, is saved in folder named "work" in an external disk (D:\work)
    I copy once again the Compile Output.

    19:59:42: Running steps for project TheData...
    19:59:42: Could not create directory "D:\work\build-D:workTheDataTheData-Desktop_Qt_6_2_2_MinGW_64_bit-Debug"
    Error while building/deploying project TheData (kit: Desktop Qt 6.2.2 MinGW 64-bit)
    When executing step "qmake"
    19:59:42: Elapsed time: 00:00.

    What do you mean by writing "nuke"? Excuse me, but Iam not a professional programmer, neither a native english speaker.
    Thank you very much for interesting in my question.


  • Lifetime Qt Champion

    Delete the .pro.user file as well as the build directory and reconfigure your project from scratch.

    The automatically generated build path is invalid as it contains ":" which if memory serves well is not allowed in file path.



  • This post is deleted!


  • This post is deleted!


  • That works. Thank you very much.
    Your answer was very helpful and I' ve learned something I didn't Know.

    One more question, please.

    In my project, a text editor is included. In this editor, I included, among other tools, a button for font editing. A day after, I deleted this button, as well as the function, connected with it and the same function from the header file. I cleaned the project and I rebuilt it.
    In the .moc file, the button still seems to be in the project.
    What else is to be deleted?
    ![0_1641419947451_Image5.jpg](Uploading 100%)


  • Lifetime Qt Champion

    Are you using the auto connect feature ?



  • I use the "go to slot" command from the right click menu.
    May be is better to write more code lines?
    For example (in an other project of mine):
    "QObject::connect(ui->changeIt, SIGNAL(clicked()), this, SLOT(setText()));
    //changeIt: the name of a button
    // setText: the function I call.

    Thanks SGaist...


  • Lifetime Qt Champion

    Do you have any slot named like on_<object name>_<signal name> ?



  • The part of code in the moc file is:
    Case 0: t→onSavebtn_clicked(); break;
    Case 1: t→newValues_clicked(); break;
    Case 2: t→onExitRbtn_clicked(); break;
    Case 0: t→onFontbtn_clicked(); break;
    //the last button is the one I deleted



  • I read in a qt tutorial that it is better for programmers to avoid "Go to slot..." command.
    Do you agree with this advice?

    /being a new user I have to wait 600 seconds until I upload a new post.
    So our dialogue should be interrupted
    /


  • Lifetime Qt Champion

    It's known to be a bit fragile. Being explicit in your code will be better in the long run especially with regard to maintainability.


Log in to reply