PDA

View Full Version : qmake can't process project file on windows



s-troz
25th October 2008, 08:18
Hi

I am experiencing a very strange error: I created a .pro file and a couple of source files on a linux machine, and after generating a Makefile and compiling successfully numerous times, committed them to an SVN repository, and checked out that repository on a windows machine. However, running qmake in the directory with the .pro file gives "Error processing project file: paintingeditor.pro", with no more information. I have tried removing various statements, qmake-ing other .pro files (which worked), changing the name of the directory to paintingeditor, and nothing works -- am I missing something totally obvious here? I can't seem to find any explanation for this problem. Running qmake -Wall prints out something about Operator= (Q_EXT_OBJ) changing previously set values or something like that, but the exact same message was printed with the other, working .pro files.

I am using Qt 4.4.3 on Windows XP Pro. The contents of my .pro file are below.


################################################## ####################
# Automatically generated by qmake (2.01a) Fri Oct 24 22:10:01 2008
################################################## ####################

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
CONFIG += debug

win32 {
CONFIG -= debug
CONFIG += release
}

# Input
FORMS += detailseditor.ui \
filechooser.ui \
paintingeditor.ui
HEADERS += detailseditor.h \
filechooser.h \
paintingeditor.h
SOURCES += main.cpp \
detailseditor.cpp \
filechooser.cpp \
paintingeditor.cpp

fullmetalcoder
25th October 2008, 14:00
weird... I can't spot any obvious error in this project file so you may try :


setting a value for the TARGET variable
changing the line endings of the file (probably not a problem but who knows)
changing the encoding of the file (same as above)
regenarating your project using "qmake -project" and then adding statements (and checking after every addition if qmake fails to find the offending statement)

s-troz
25th October 2008, 15:49
Thanks for the suggestions, I'd tried everything but changing the encoding, however re-generating the file from scratch with qmake -project would cover that as well -- no matter what I did, I kept getting the same errors. Very weird, I know.

In case it was some crazy problem with Windows, I also tried again after rebooting (using my original project file and regenerating with -project), which, again, failed. Running qmake -d -d doesn't seem to show any errors, reading all the default config files (in C:\Qt\4.4.3\) goes fine, the last two messages are: Reading project file "C:\path\to\paintingeditor.pro" and "Error processing project file" i.e. the message from the first post.

s-troz
25th October 2008, 15:51
Good news! I found the problem! There was a single quote in one of the parent directory's name -- renaming that directory did the trick. Now that I think of it, I seem to recall possibly reading about this in the manual. I am a little surprised that I seem to be the only person whose ever had this problem, as multiple Google and forum searches (over different forums) returned absolutely nothing relevent.