Recent

Author Topic: [SOLVED] Stopped compiling without a reason  (Read 240 times)

CM630

  • Hero Member
  • *****
  • Posts: 1772
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
[SOLVED] Stopped compiling without a reason
« on: July 18, 2026, 12:23:48 am »
Happened multiple times - change somewhere, press F9 and some totally unrelated unit is not compiling.
Usually I do “clean up and build”, but this time it does not help.

I have attached the problematic file, though I believe there is nothing wrong with it, it compiled tens of time before it started creatig problems.

The error shown:
Code: Pascal  [Select][+][-]
  1. fmultirename.pas(2276,27) Error: function header doesn't match any method of this class "SetFilePropertyResult(LongInt;TFile;TFileProperty;TSetFilePropertyResult);"
  2. fmultirename.pas(328,15) Error: Found declaration: SetFilePropertyResult(LongInt;TFile;TFileProperty;TSetFilePropertyResult);


I have more than 1 GB on the dirve where Lazarus is installed, so it should not be caused by insuficient disk space.
« Last Edit: July 18, 2026, 08:35:09 am by CM630 »
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

jamie

  • Hero Member
  • *****
  • Posts: 7902
Re: Stopped compiling witout a reason
« Reply #1 on: July 18, 2026, 12:28:38 am »
using Generics ?
The only true wisdom is knowing you know nothing

CM630

  • Hero Member
  • *****
  • Posts: 1772
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Stopped compiling witout a reason
« Reply #2 on: July 18, 2026, 06:33:30 am »
I do not understand your question.
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: Stopped compiling without a reason
« Reply #3 on: July 18, 2026, 07:42:42 am »
If it were generics that would show up as a generics, Jamie...
Anyway, the 7zipped unit is not enough to debug it.
Wild guess, just by reading:
SetFilePropertyResult is private and the signature of TSetFilePropertyResult is different?
And you use it as a parameter....

And TSetFilePropertyResult is not declared in that unit.....
« Last Edit: July 18, 2026, 07:50:24 am by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12641
  • Debugger - SynEdit - and more
    • wiki
Re: [SOLVED] Stopped compiling without a reason
« Reply #4 on: July 18, 2026, 08:40:02 am »
My guess:

"uses" in implementation section. One of the types gets a new definition.

E.g.
Code: Pascal  [Select][+][-]
  1. unit foo;
  2. interface
  3. use Bar; // defines TSome = class;
  4. procedure a(b: TSome);
  5. implementation
  6. uses Bar2; // defines TSome = record
  7.  
  8. procedure a(b: TSome); // declaration does not match

CM630

  • Hero Member
  • *****
  • Posts: 1772
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: [SOLVED] Stopped compiling without a reason
« Reply #5 on: July 18, 2026, 08:41:58 am »
The morning is wiser than the evening.
I have defined TFileProperty in another form, and SetFilePropertyResult(LongInt;TFile;TFileProperty;TSetFilePropertyResult); decided to prefer the new type, instead of his own.

The form in which I have defined TFileProperty does not see the other TFileProperty.

So it has nothing to do with the usual “Clean up and build”.

Edit: Martin_fr posted while I was typing. His post seems the right guess.
« Last Edit: July 18, 2026, 08:43:48 am by CM630 »
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

 

TinyPortal © 2005-2018