Unsolved 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.
-
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?Regards
-
@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" -
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.
-
-
-
@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 ?
-
From your screenshots I can see that you already changed some configurations; that may be a root of the problem.
- You installed Qt for MSVC2017 but not MSVC2017 compiler (and therefore probably the red exclamation sign in Kits)
- You added manual compilers which I guess are not needed
- 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"
- 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. -
@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.
- You can change the permisions, right click->properties in explorer, use the
attrib
command on the command line, etc. - 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. - 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.
- You can change the permisions, right click->properties in explorer, use the
-
Now i am getting it as no rule to make target all stop.
What should i do ? -
@Jhanvi please close Creator, delete the
*.pro.user
and then open the project again. -
where is the .pro.user ?
-
@Jhanvi In the root directory for the project you are building. At the same level of the .pro file.
-
Still the same error.
-
@Jhanvi Post the actual build log so we can see what really went wrong.