PDA

View Full Version : Running Qt Creator examples



Saman
5th May 2009, 16:42
Hello, I just downloaded qt creator(Qt SDK 2009) from its site and tried to run some of it examples but it failed.

Error mesages
QApplication: No such file or directory

C:/Program Files/Qt/2009.01/qt/examples/mainwindows/dockwidgets/main.cpp:44: In file included from main.cpp:44:

C:/Program Files/Qt/2009.01/qt/examples/mainwindows/dockwidgets/mainwindow.h:45: QMainWindow: No such file or directory

C:/Program Files/Qt/2009.01/qt/examples/mainwindows/dockwidgets/main.cpp:44: In file included from main.cpp:44:

and some more errors that I think are consequences of above errors like

C:/Program Files/Qt/2009.01/qt/examples/mainwindows/dockwidgets/mainwindow.h:48: error: expected constructor, destructor, or type conversion before "class"

C:/Program Files/Qt/2009.01/qt/examples/mainwindows/dockwidgets/mainwindow.h:55: error: expected constructor, destructor, or type conversion before "class"

...

I think some variables are not set properly but I could not figure out what exactly.

is this QApplication stuff a header file I mean dose it try to load qapplication.h or is it a namespace?

can someone help?

regards,

PS -I use Windows XP sp2

Lykurg
5th May 2009, 17:43
Your compiler can't find the Qt stuff. So maybe for you it would be the best if you open the "example".pro in QtCreator and let him compile the example instead using the console.

Saman
5th May 2009, 18:26
I tried just to do that. I opened the "example".pro in QtCreator, it loads the source files but build fails with messages that I said in above post. There should be some parameters in Qt creator that I have to setup.

Lykurg
5th May 2009, 19:16
Ok, sounds like you don't... Then check if your %PATH variable is set in windows (which should be done in a proper installation of creator) and look inside qtcreator with the example opened under Projects->build setting->(Debug|Release): Qt Version. Is there a valid qt version defined? check via the button Manage Qt Version. For your case aaaaaaahhhhh now I see the default error:

You HAVE to install Qt in a directory WITHOUT any space. "Program Files" is not valide. Reinstall Qt g.e. c:\qt

Lykurg

Saman
5th May 2009, 20:13
Thanks Lykurg,
It was indeed as you smartly pointed out " the default error".
I really hate to fill root directory with thousands of directories and this error has happened to me before. Many big programs like this and xilinx ISE design suite(for FPGA programming) with millions of lines of code are really handicap to deal with addresses bigger than 8 char. Couldn't the smart guy inm microsoft had name it something else like "Progs" or other short names that are used in linux.

Lykurg
5th May 2009, 20:21
Couldn't the smart guy inm microsoft had name it something else like "Progs" or other short names that are used in linux.
Well the curiosity is that this depends on your language options. In german it's "Programme", no spaces but 9 characters ;-)