qmake using source files not in .pro file
I'm running QT 4.5.2 on Windows XP
I'm trying to make a simple HelloWorld application, but have run into a puzzling problem with qmake.
My .pro file (MyHelloWorld.pro) looks thus:
Code:
######################################################################
# Automatically generated by qmake (2.01a) Do 9. Jul 14:51:28 2009
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
SOURCES += helloWorld.cpp
My only source file (helloWorld.cpp) looks thus:
Code:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
label->show();
return app.exec();
}
when running qmake MyHelloWorld.pro
the result is:
Code:
qmake MyHelloWorld.pro
WARNING: Failure to find: ../HelloWorld/main.cpp
WARNING: Failure to find: ../HelloWorld/hellowin.cpp
WARNING: Failure to find: ../HelloWorld/hellounix.cpp
WARNING: Failure to find: ../HelloWorld/hello.cpp
WARNING: Failure to find: ../HelloWorld/hello.h
WARNING: Failure to find: ../HelloWorld/main.cpp
WARNING: Failure to find: ../HelloWorld/hellowin.cpp
WARNING: Failure to find: ../HelloWorld/hellounix.cpp
WARNING: Failure to find: ../HelloWorld/hello.cpp
WARNING: Failure to find: ../HelloWorld/hello.h
Where do all those files come from? They're certainly not mentioned in the .pro file.
Any hints? Also: Any links to tutorials that actually explain the build process (not only the parameters of qmake) would be greatly appreciated!
Robert
Re: qmake using source files not in .pro file
first try to give
TARGET = myhello
and see if the errors go away..
next read this http://doc.trolltech.com/4.5/qmake-manual.html
Re: qmake using source files not in .pro file
Quote:
Originally Posted by
MrDeath
Thanks. Error does not go away, but I'll see if I can finds something in the manual. Quicker fixes still welcome!
Re: qmake using source files not in .pro file
Is there a kind of cache that I need to empty? Because those are source files from the previous project I tried to make.
Re: qmake using source files not in .pro file
have you posted the full pro file or part of it?
Re: qmake using source files not in .pro file
That's the full file. It was auto-generated by qmake -project
Something missing?
Re: qmake using source files not in .pro file
are you running qmake in the same directory as the pro file?
Re: qmake using source files not in .pro file
Yes. My command line is in the directory with the aforementioned .pro file, and I type "qmake MyHelloWorld.pro"
BTW, the only QT-related entry in my PATH env-var is the [...]\qt\bin\ folder
Re: qmake using source files not in .pro file
may be try to remove +=
SOURCES += helloWorld.cpp
to
SOURCES = helloWorld.cpp
HEADERS = dummy.h
Re: qmake using source files not in .pro file
may be try to remove +=
SOURCES += helloWorld.cpp
to
SOURCES = helloWorld.cpp
HEADERS = dummy.h
edit:
also try to rename the folder, pro file to helloWorld
Re: qmake using source files not in .pro file
Aaaahhh...now we're getting somewhere!
Does qmake retains the variables last used? Even when re-booting the machine (which I did several times)?
Re: qmake using source files not in .pro file
so did your problem solved? its strange..
Re: qmake using source files not in .pro file
Yep. That problem's solved. Now for the make...but I'll tinker around a bit before calling for help ;)