Weird issue during the project building[SOLVED]
-
Try to completely rebuild the project, please.
There are menu and context menu entries you can call. -
Yep, I tried. Result is the same.
-
Erm... the last output you posted here (that one right before my first comment) does not contain any errors...
-
[quote author="Volker" date="1327930863"]Erm... the last output you posted here (that one right before my first comment) does not contain any errors...[/quote]
I meant the output with the errors. Every time, when I tried to add the widget with the name "First", I get an error while building the project. It's weird...
But if the name will be "Firstttt" etc. it works fine. As before, the question is, why or what's wrong with the name "First"?
-
Can you put that project in a ZIP somewhere to download? Please only the sources (.h, .cpp, .ui) and the project file (.pro), no generated files (.o, moc_.cpp, ui_*.h) and no executables.
-
Yes, sure. Here the link: http://students.oamk.fi/~t9nidm00/MultiPages.zip
BTW, I'll appreciate any suggestions about the code inside. Yes, it's not a real project, only playing with Qt. But I would like to know someone's opinion about working without QStackedWidget =) -
First the cure:
Rename first.h, first.cpp and first.ui to something different, eg. myfirst.h, myfirst.cpp and myfirst.ui.Second the explanation:
You (and I) ran into a very subtle trick of qmake's makefile generation. qmake always generates a target "first" which is nothing else than an alias to target "all". Additionally, the makefile contains some magic rules that describe how to compile a source file into some object file, probably even builtin rules. Unfortunately, caused by the target first, these rules apply to the source file first.cpp, eventually leading to that crippled compiler call.Unfortunately, there is no other solution than renaming your source files. So, the big rule is:
Never put any file named first.xxx into a qmake based project!
-
Wow, you never gonna sleep without known anything new...
-
BTW
To demonstrate that it's actually the first target in the Makefile, take your original project (using first.xxx), open the Makefile in a text editor of your choice, search for a line "first: all" and change that to "first-xxx: all" and call make. It will run without problems :) -
Thank you very much!
But what about the code inside of .zip? Could you, please, comment it? I mean, mainwindow.cpp and other guys, excluding first.cpp and first.h.