[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.
-
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? -
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
-
[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.
-
@
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.
-
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).