November 27, 2010

Cameron Cameron
Lab Rat
5 posts

[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):

  1. Running build steps for project CodeProgram...
  2. Starting: "/home/cameron/qt/qt/bin/qmake" /home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro -r -spec linux-g++ CONFIG+=debug
  3. Failure to open file: /usr/share/jolicloud-daemon/htdocs/Makefile
  4. Unable to generate makefile for: /home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro
  5. The process "/home/cameron/qt/qt/bin/qmake" exited with code %2.
  6. Error while building project CodeProgram (target: Desktop)
  7. 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.

15 replies

November 27, 2010

blex blex
Lab Rat
192 posts

  1. 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.

 Signature 

————————————

Oleksiy Balabay

November 27, 2010

dfaure dfaure
Lab Rat
45 posts

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?

 Signature 

David Faure (.(JavaScript must be enabled to view this email address))
KDE/Qt Senior Software Engineer
KDAB - Qt Experts - Platform-independent software solutions

November 27, 2010

Volker Volker
Ant Farmer
5428 posts

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.

November 27, 2010

lyuts lyuts
Lab Rat
169 posts

I would suggest you using version control system instead of DropBox. VCS is designed for that.

 Signature 

I’m a rebel in the S.D.G.

November 28, 2010

Cameron Cameron
Lab Rat
5 posts

Thanks for the feedback guys.

  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2010-11-07T12:08:25
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT       += core gui
  8.  
  9. TARGET = CodeProgram
  10. TEMPLATE = app
  11.  
  12.  
  13. SOURCES += main.cpp\
  14.         mainwindow.cpp \
  15.     codeeditor.cpp \
  16.     preferences.cpp \
  17.     highlighter.cpp
  18.  
  19. HEADERS  += mainwindow.h \
  20.     codeeditor.h \
  21.     preferences.h \
  22.     highlighter.h
  23.  
  24. FORMS    += mainwindow.ui \
  25.     preferences.ui
  26.  
  27. RESOURCES += \
  28.     Resources.qrc
  29.  
  30. OTHER_FILES +=

that’s the .pro file

November 28, 2010

IrQX IrQX
Lab Rat
74 posts

Have you tried

  1. make clean
  2. qmake
  3. ..

?

And what means OTHER_FILES in your *.pro file? If it blank – remove this line from file, and try again.

November 28, 2010

Cameron Cameron
Lab Rat
5 posts

IrQX wrote:
Have you tried
  1. make clean
  2. qmake
  3. ..

?

And what means OTHER_FILES in your *.pro file? If it blank – remove this line from file, and try again.

I dunno, didn’t notice that. Thanks for pointing that out, will try now.

November 28, 2010

Cameron Cameron
Lab Rat
5 posts

didn’t seem to work.

@IrQX – could you please explain more in-depth what you mean by “make clean”?

November 28, 2010

Volker Volker
Ant Farmer
5428 posts

  1. 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.

November 28, 2010

Cameron Cameron
Lab Rat
5 posts

As you see in the first post where I pasted the error message, the .pro file is in

  1. /home/cameron/Dropbox/Code Program/CodeProgram/CodeProgram.pro

but Qt is searching for the “Qmake” in

  1. /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.

November 28, 2010

Volker Volker
Ant Farmer
5428 posts

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).

November 28, 2010

Cameron Cameron
Lab Rat
5 posts

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!

November 28, 2010

Volker Volker
Ant Farmer
5428 posts

No problem, you’re welcome – that’s what these forums are for.

February 6, 2012

maissiou23 maissiou23
Lab Rat
12 posts

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).

February 9, 2012

Volker Volker
Ant Farmer
5428 posts

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.

 
  ‹‹ Mac: How to display a context menu for a toolbar, when it’s made "unifiedTitleAndToolBarOnMac"?      Exif tags ››

You must log in to post a reply. Not a member yet? Register here!