Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qmake unable to generate project file from QtCeator...
Absolute noob here so please explain with examples.
I'm trying to create a very simple UI for a, raspberry pi 3b+ based, robot (just a *.gif animation of it sleeping for now, next hurdles next).
I've managed to create an image, in a label, in QtCreator (which took 2 days in itself) and have spent the rest of the week trying to find a way to get the options screen to fit on an 800x480 resolution screen. I understand now that I can compile from the terminal using Qmake, which looks like my best option...
...but when I run
from the folder containing my project, I get returned.
Failure to find file: /robo_ui/robo_ui.pro Unable to generate makefile for: robo_ui.pro
That's it. It doesn't even get to the starting phase I've seen in a lot of the other threads similar to this.
I'm using Qt5.5.1 and here's what's inside my project file:
It looks like somewhere down the line Qmake has recreated my project file, this isn't what was in the file before I ran Qmake as admin; still doesn't work though:
#################################################### # Automatically generated by qmake (3.0) <date><time> #################################################### TEMPLATE = app TARGET = robo_ui INCLUDEPATH+=. #Input HEADERS += mainwindow.h FORMS += mainwindow.ui SOURCES += main.cpp mainwindow.cpp
Any Ideas? Is that enough information?
@chuckborisnorris Ubuntu 16.04 btw if that's important, i thought linux would be implied by the rpi
I ran Qmake as admin
"/robo_ui/robo_ui.pro" - is this path correct? If so, why is your project located in /robo_ui and not in your home directory?!
If you already have a *.pro file - why do you call "qmake -project"? Just call qmake and then make. Adjust the project file if needed.
@jsulm why? read the first line, I'm a total noob, I'm just trying whatever I can.
The project has been moved from home to myuser to desktop and all over the place, if it has to be in a specific place, can I be told explicitly rather than implied as an idiot for not knowing automatically.
I call qmake -project because that's what various tutorials have told me to do.
Dont bother asking which, please, I'm not going to list every forum page I've looked at this week.
By the way, qmake on its own gives me a similar reply, unable to generate makefile. So 'just call qmake and make' is unhelpful as well.
Adjust the project file if needed... to what? How do I find out what needs to be adjusted related to what in my system? I repeat, noobs need examples!
rather than implied as an idiot for not knowing automatically
Please calm down, I did not imply you being an idiot. I just ask why you did this, nothing more.
You should keep your project somewhere in your home directory - here you have access rights and don't need to do anything as root.
qmake -project is needed only once to generate the project file.
Now you have it already.
Please run qmake and post the whole output here.
"Adjust the project file if needed... to what?" - that depends on what is wrong, that's why I suggest to post the qmake output.
The project has been called from /home/me/robo_ui; is this not my home directory? The output is as in the first post "failure to find... unable to generate..."
@chuckborisnorris In the first post you called qmake with -project parameter. What happens if you call qmake without -project parameter?
In the first post I really didn't want to list every single operation I've performed...
- qmake from /home/myuser/roboi_ui - failure to find... unable to generate makefile...
- sudo qmake from /home/myuser/roboi_ui - no output in terminal, no makefile
@chuckborisnorris OK, lets be more clear. In /home/myuser/roboi_ui you have the pro file? And if you call qmake without -project in that directory you get "failure to find ..."?
The thing is: if you do not provide needed information you will not get any meaningful help as others can only guess then.
So please tell us exactly what you did and what output you got.
@jsulm once again, absolute noob, I am explaining what I've done to the best of my ability.
Yes my project is in the above directory atm, is this the correct ditectory? I have tried all possible combinations of sudo, qmake, -project (explicitly: qmake, sudo qmake, qmake -project, sudo qmake -project) i have also tried all of these commands with the project folder on my desktop.
@chuckborisnorris posted by accident. Meant to say: pretty sure this has already been stated earlier. Let's be more clear: What other info do you need?
@chuckborisnorris You didn't answer this question: "In /home/myuser/roboi_ui you have the pro file?".
"is this the correct ditectory?" - it doesn't matter where you put it in your home directory, that's fine.
Can you show what is inside /home/myuser/roboi_ui ?
Can you then change to that directory, run qmake (without -project and without sudo) and post the output here?
@jsulm the project file is in the robo_ui folder, as previously stated (admittedly by proxy)
I can't show you the output until I get home from work which won't be until tomorrow night. I'll do that when I can.
I've finally got it sussed, turns out it was a Linux issue rather than a Qt issue.
@jsulm I see now why you were confused about the folder structure, apologies for my frustration yesterday, I thought you were just being pedantic. Sorry.
The makefile was created with "sudo qmake" but the terminal couldn't see it (it didn't show up with "ls" either). In the explorer, though, it did show up. Interestingly when I used the QtCreator file browser to find the makefile (for experimental purposes only) I couldn't see it either. I assume it's some sort of weird permissions thing going on so I just created a new user profile and now I can build my UI without any issues.
If I find out what caused all this I'll post it up but classic first post eh? ...Issue had nothing to do with the forum <Picard face-palm>.
@chuckborisnorris No problem! Such things happen :-)