Problem regarding building even an Qt example.

  • When I am building a simple Qt example , I am getting an error saying "no rule to make target all .stop." Can you help how to solve this issue.

  • Qt Champions 2018

    Hi @Jhanvi and welcome!

    to help you we need some more information.

    Which Operating system are you using?
    Which Qt version?
    How did you install Qt?
    I assume you use QtCreator, if yes, which version?
    Which compiler did you install / intent to use?


  • @aha_1980
    I am using Windows 10 (64 bit OS)
    I am using the Qt version 5.10.1
    I installed Qt with mingw as the compiler
    I am using Qt creator 5.10.1
    I intalled the MingW compiler and the MSVC2017 as the compiler
    I intend to use mingw as the compiler but i am getting the error as:
    Error while building/deploying the project test1(project name) (kit: Desktop Qt 5.10.1 MinGW 32bit)
    When executing step "qmake"

  • Qt Champions 2018


    so please go to Tools > Options > Build & Run and check if your Compilers are detected properly. Also make sure that each Qt version has the correct compiler assigned in Kits.

    you can also post some screenshots here if in doubt.

  • 0_1520671492248_eg3.png 0_1520671499248_eg4.png

  • Qt Champions 2018

    @Jhanvi did you read the red error output?

    it cannot create a directory as it seems you dont have write access there.

    try copying the example to a writable location and try again.

    edit: other possibility: the path to the build folder got messed up.

  • I did not clearly understand what you are trying to explain . Could you please elaborate with more detailed steps. And also how to make sure the compilers are detected properly and assign the kits as you mentioned earlier ?

  • Qt Champions 2018


    From your screenshots I can see that you already changed some configurations; that may be a root of the problem.

    1. You installed Qt for MSVC2017 but not MSVC2017 compiler (and therefore probably the red exclamation sign in Kits)
    2. You added manual compilers which I guess are not needed
    3. You changed the default build directory in the third screenshot, therefore the warning "The build directory needs to be at the same level as the source directory"
    4. You get a red error in the second screenshot: "Could not create directory [...]" This is probably because you don't have write access to that directory

    Point 4 is the critical point here; it's impossible to build if directories and files cannot be created. Can you try to create a new project in a directory you surely have write access? I assume that building with MinGW will work then.

  • So please tell me how should i check that i have the write access to it and if please provide me the steps to do the same.
    I am trying to run a simple qt example but still it is showing me the same error and hence i can not build any of my projects please help me with it.

  • Moderators

    @Jhanvi You probably installed with admin permissions to that directory and you are trying to build with a non-admin/elevated user.

    So it can not create the build directory it needs because of the permissions on the Qt install.

    1. You can change the permisions, right click->properties in explorer, use the attrib command on the command line, etc.
    2. You could copy the example out into a directory you do have permissions to, i.e. c:\users\youruser\qt-examples and then open and build from there.
    3. You could run qt creator as admin

    I recommend #2... #1 and #3 can be dangerous, so I wouldn't go that route, but it's an option.

  • Now i am getting it as no rule to make target all stop.
    What should i do ?

  • Qt Champions 2018

    @Jhanvi please close Creator, delete the *.pro.user and then open the project again.

  • where is the .pro.user ?

  • Moderators

    @Jhanvi In the root directory for the project you are building. At the same level of the .pro file.

  • Still the same error.

  • Moderators

    @Jhanvi Post the actual build log so we can see what really went wrong.

Log in to reply