[Solved] Bug in Lazarus project compilation lazarus / 9-Editor ---------------------------------------------------------------------- JD · 2012-02-06 16:33 Hi there everyone, I've noticed a strange bug in compiling Lazarus projects. Whenever I make changes to the source code of a form, Lazarus does not incorporate the changes I make into the resulting exe file. For example, if I move or resize a control, the changes are not seen even after saving and recompiling the project (using 'Compile', 'Build' or even 'Quick Compile'). Has anyone else experienced this? It is driving me nuts because I can't see the effects of changes I make to my source code. I'm using Lazarus 0.9.31 fpc 2.6.0 svn 34536 on XP and Vista. Thank you for your assistance. JD ---------------------------------------------------------------------- BigChimp · 2012-02-06 16:44 Bit of a negative answer, but no, I've never seen something like that... ---------------------------------------------------------------------- JD · 2012-02-06 16:50 It exists believe me. I've even tried to force building several times but it still did not work. ---------------------------------------------------------------------- ludob · 2012-02-06 16:57 QuoteWhenever I make changes to the source code of a formYou are talking about editing the lfm file? I also noticed this. To edit the lfm., close the unit (the .pas or .pp) before saving the lfm. What happens is that the changes in the lfm are not reflected in the form editor and when you compile, the autosave will overwrite your changes to the lfm with the form contents in the form editor. ---------------------------------------------------------------------- JD · 2012-02-06 18:06 Quote from: ludob on February 06, 2012, 05:57:46 pmQuoteWhenever I make changes to the source code of a formYou are talking about editing the lfm file? I also noticed this. To edit the lfm., close the unit (the .pas or .pp) before saving the lfm. What happens is that the changes in the lfm are not reflected in the form editor and when you compile, the autosave will overwrite your changes to the lfm with the form contents in the form editor. I didn't edit the lfm file directly. I just updated the form and added some events to the controls I have on the form and these changes were not compiled into the application. ---------------------------------------------------------------------- Martin_fr · 2012-02-06 18:26 Does it happen, if you create a new project too? Maybe some old file being around? Maybe a copy of the lfm in some path (lib) ? Maybe an old unit1.lfr, still in use? ---- "Publish" the project to a new folder, try working in the new folder ---------------------------------------------------------------------- Leledumbo · 2012-02-07 01:44 Nope, never happens to me as well. Could you create a minimal project that demonstrate this and attach it here? ---------------------------------------------------------------------- JD · 2012-02-07 14:24 Quote from: Leledumbo on February 07, 2012, 02:44:36 amNope, never happens to me as well. Could you create a minimal project that demonstrate this and attach it here? It doesn't happen in all projects. Just a particular project. For example, I took a look at the form's related files and the dates of modification: hopitaux.lfm                    31Ko                 06/02/2012    17:52:09 hopitaux.lrs                     44Ko                 04/11/2011    23:54:52 hopitaux.lrt                    802 Octets         13/06/2009    13:11:00 hopitaux.pas                   10Ko                 06/02/2012    17:52:08 Ko = kilobytes; Octets = Bytes Is this normal? Sorry the time is in the French 24 hour time format. Cheers, JD ---------------------------------------------------------------------- JD · 2012-02-07 15:44 I found the answer. I decided to delete the old *.lrs and *.lrt files created by an older version of Lazarus. I then recompiled my project and now all my changes are incorporated into the exe file. Thank you very much for your contributions. JD