[solved]Error while compiling project with "QMake"
-
wrote on 27 Nov 2010, 06:51 last edited by
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.
-
wrote on 27 Nov 2010, 06:59 last edited by
@
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.
-
wrote on 27 Nov 2010, 10:06 last edited by
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? -
wrote on 27 Nov 2010, 14:11 last edited by
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.
-
wrote on 27 Nov 2010, 17:18 last edited by
I would suggest you using version control system instead of DropBox. VCS is designed for that.
-
wrote on 28 Nov 2010, 00:22 last edited by
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
-
wrote on 28 Nov 2010, 09:00 last edited by
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.
-
wrote on 28 Nov 2010, 16:47 last edited by
[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.
-
wrote on 28 Nov 2010, 17:24 last edited by
@
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.
-
wrote on 28 Nov 2010, 18:33 last edited by
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.
-
wrote on 28 Nov 2010, 18:43 last edited by
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).
-
wrote on 28 Nov 2010, 19:07 last edited by
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!
-
wrote on 28 Nov 2010, 21:05 last edited by
No problem, you're welcome - that's what these forums are for.
-
wrote on 6 Feb 2012, 04:16 last edited by
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). -
wrote on 9 Feb 2012, 12:27 last edited by
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.