[solved]Error while compiling project with "QMake"
-
Hey guys. relatively noobish Qt user here :P
a friend of mine and I have been working on a code editor, being created with Qt. For collaboration purposes, we use DropBox to sync our files together, then load the project from there. It runs fine on his computer (Win7), but I get this error when I try to compile (I've tried on XP, Ubuntu and Jolicloud):
@Running build steps for project CodeProgram...
Starting: "/home/cameron/qt/qt/bin/qmake" /home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro -r -spec linux-g++ CONFIG+=debug
Failure to open file: /usr/share/jolicloud-daemon/htdocs/Makefile
Unable to generate makefile for: /home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro
The process "/home/cameron/qt/qt/bin/qmake" exited with code %2.
Error while building project CodeProgram (target: Desktop)
When executing build step 'qmake'@The only guess I have for this is that it's a problem with the OS bit rate, i think his Win7 version runs 64 while all 3 OS' i tested on happened to run on a 32 bit OS.
Note - this only happens when loading this project, I created my own to test it and it compiles fine.
Thanks for any help in advance.
-
@
Failure to open file: /usr/share/jolicloud-daemon/htdocs/Makefile
@Are you sure that path exists and permissions are sufficient?
Also, you have a white-space in the path near the "Code Program". Try to remove it.
-
The question is why is it trying to generate a Makefile in /usr, this doesn't make sense ;)
Can you post the contents of the CodeProgram.pro file? -
The Makefile is generated in the current working dir, not in the dir where the .pro file is. So I'd guess he is in /usr/share/jolicloud-daemon/htdocs when he calls qmake.
-
I would suggest you using version control system instead of DropBox. VCS is designed for that.
-
Thanks for the feedback guys.
@#-------------------------------------------------
Project created by QtCreator 2010-11-07T12:08:25
#-------------------------------------------------
QT += core gui
TARGET = CodeProgram
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
codeeditor.cpp
preferences.cpp
highlighter.cppHEADERS += mainwindow.h
codeeditor.h
preferences.h
highlighter.hFORMS += mainwindow.ui
preferences.uiRESOURCES +=
Resources.qrcOTHER_FILES +=
@that's the .pro file
-
Have you tried
@make clean
qmake
..@
?And what means OTHER_FILES in your *.pro file? If it blank - remove this line from file, and try again.
-
[quote author="IrQX" date="1290934842"]Have you tried
@make clean
qmake
..@
?And what means OTHER_FILES in your *.pro file? If it blank - remove this line from file, and try again.[/quote]
I dunno, didn't notice that. Thanks for pointing that out, will try now.
-
didn't seem to work.
@IrQX - could you please explain more in-depth what you mean by "make clean"?
-
@
make clean
@is a command that you enter in your shell. Usually a Makefile contains a target clean to remove all intermediate files (.o object files, moc- and uic-generated files) and the the final executable or lib.
What is your current working dir (i.e. what dir are you in), when you call qmake? You must be in the dir containing the .pro file.
-
As you see in the first post where I pasted the error message, the .pro file is in
@/home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro@
but Qt is searching for the "Qmake" in
@/home/cameron/qt/qt/bin/qmake@
also, i'm not running this in terminal or anything. i just clicked the green "run" arrow in the left sidebar.
-
You did not mention that you use Qt Creator, so we suggested you use the command line tools.
What are the settings of your project page? Of special interest are the paths (shadow build, build directory).
-
Oh my....Official failure on my part.
I didn't know that Qt kept a static build directory, so the QMake dir was set to his computer's. I changed and it works perfectly now.
sorry for all the trouble, and thanks for the great support!
-
No problem, you're welcome - that's what these forums are for.
-
try to delete the root folders generated by QT when compiling.
let say your project path is: C:/KK/Project. Then you just need to delete C:/KK/Project-Build... This way you delete old QT configurations saved inside these build folders (which may not be compatible with you're current config). -
No necroposting, please. There's no need to wake the dead - the thread had its last response for more than one year ago and it was resolved already. Thanks.