Qtcreator builds from old sources
-
I'm trying to write a small app that will read an xml file. but for the moment I am stuck because only some of the changes I make are actually shown in the application.
The program keeps building an old version of the program in some way ...I tried cleaning the project both from the interface and manually.
I tried creating a new project and moving the code into the new project and that didn't work.
I tried to move the code in a new function and even that didn't work.
I tried making changes to the interface and added code in the same source file... the changes worked but the old code keeps giving me messages that are by now ancient.I have no warning or any kind of build issues and I am definitely out of ideas now
-
You can try to clean the project and then to rebuild it. You can also execute qmake manually from the console.
[quote author="harlequin.64" date="1304444444"]
I tried creating a new project and moving the code into the new project and that didn't work.
[/quote]Are you sure in your source at all?
Regards,
Leon -
Yes. I print some stuff to the terminal so I am sure that I didn't mistake the file or forget to delete something.
The output to the terminal is something from the beginning when I was still testing to see if it runs.
Since then I have added a bit more code and when it came time to test it i still got the old trace messages in the console.I am new to qt so I don't know if this helps but I checked the run in terminal option in the project menu
-
Can you share some source code and output?
-
Not right now. Tomorow
-
Same happened here. My approach:
- Make sure the executable is deleted when make-cleaning the project.
- Also, make sure the cleaning option removes any file other than ui_*, *.cpp & *.h
- If on Linux, use touch command on every file you relate to. If not, make sure every file has been modified before compiling, so the compiler would take them into account.
- Beware of Qt Designer's "shadow build" option... Toy with it a little bit and see if this helps.
- Don't be shy to close and reopen Qt Designer, should you be using it.
- Are you moving Qt sources between projects? You may be trying to compile older files. See the compiler's individual commands & outputs.
Good luck!
-
The build tools are based on modification times of files. So are you sure all the clocks build into the computers accessing the files are set up correctly? A fileserver being off by a couple of hours somewhere can cause a lot of trouble!
-
In the end I think it was my fault. It was a big xml file and I didn't check every section to make sure everything was OK.
An army of debug output later I realized the problem was in the xml file.Though it was a big coincidence that the new bad output was the same as the old good output
Sorry. -
BUT you rightfully worked it out. Congrats! ;)