G'day,
I've run into a bit of a confusing problem, and I can't seem to find out how to solve it.
The issue is that when I do a manual build (Run|Build), the project compiles with the -B flag set.
But when I make a small change to the source (by indenting a line, joining a statement, anything that doesn't cause an error), the automatic rebuild never does a -B rebuild, and so I get a strange error (this is the tail of my message window with the error):
Debug: target set to i386 - mach-o
Debug: finished parsing command line parameters
Debug: Trying to open file /Users/Pietje/Sources/lazarus/lcl/units/i386-darwin/finddlgunit.lfm...
Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file /Users/Pietje/Sources/lazarus/lcl/units/i386-darwin/replacedlgunit.lfm...
Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to opRIFFStalker.lpr(24,1) Error: Error while compiling resources. Compile with -vd for more details. Check for duplicates.
RIFFStalker.lpr(24,1) Fatal: There were 1 errors compiling module, stopping
Now, without touching the code, if I perform a manual build (or a clean-and-build), the same source compiles and links perfectly! (Checking and comparing the outputs, the only difference is the manual build always sets the -B flag, whereas the autobuild never does - and I can't find where to turn that on in the IDE...)
What am I doing wrong, and how can i configure the IDE to automatically perform a clean build when it auto-rebuilds? Alternatively, how can I track down what's causing this to happen in the IDE, since a non-clean build *should* still compile, as only the one single source has changed, which means there must be a "leftover" file somewhere, right?
I can't use the "Always Build" option, because then the error is introduced every time (even for a manual build, or a clean and build) - that just makes things worse!
I'm sure it's something I'm doing wrong, but do you think I can see where? No!
However, I noticed that earlier in the compile and link process, a space in the project's pathname causes some extremely weird pathname parsing results. But since those same weird results are in the good build, it can't be that.
I've been through the documentation and this site, and I can't find any mention of the duplicate build error, but if I'm missing something, please do let me know!
Cheers,
Pete
UPDATE: Why is it that the error description is so clear in my head, but when it gets to the forum, it reads like a mad woman's pee? Sigh.
Anyway, while trying a couple of the different verbosity options, I found something more interesting that leads me to suspect it's not me, after all.
If I again click 'Run' after the error is generated, the project compiles perfectly!
So, to recap, after making a change and triggering the auto-rebuild, Lazarus generates an error. If the same process is repeated, without any further changes, the error goes away.
I don't even know where to begin looking for this. Can anyone suggest a clue?
Thanks!