anchor.diff:    Classes, SysUtils;
   
   type
  +  TOutputLineEvent = procedure(Sender: TObject; const ALine: string) of object;
  +
     TBuilderThread = class(TThread)
     private
       FBuildMode: integer;
  +    FOnAvailableOutput: TOutputLineEvent;
  +    OutputLine: string;
  +    procedure DoOutputLine;
     protected
       procedure Execute; override;
     public
       procedure AfterConstruction; override;
       property  BuildMode: integer read FBuildMode write FBuildMode;
  +    property  OnAvailableOutput: TOutputLineEvent read FOnAvailableOutput write FOnAvailableOutput;
     end;
   
   implementation
  
positive.code: 
  //  AddMessage('Compile command: ' + c);
    p.CommandLine := c;
    p.Execute;
  //  AddMessage('Compilation complete');
    p.Free;
  
  end;
  
  end.
  
negative.code: end;
  
  procedure TBuilderThread.Execute;
  const
    BufSize = 1024; //4096;
  var
    p: TProcess;
    c: TfpgString;
    unitdir: TfpgString;
    Buf: string;
    Count: integer;
    i: integer;
    LineStart: integer;
  begin
    unitdir := GProject.ProjectDir + GProject.UnitOutputDir;
    unitdir := GMacroList.ExpandMacro(unitdir);
    if not fpgDirectoryExists(unitdir) then
    begin
      {$IFDEF DEBUG}
      writeln('DEBUG:  TBuilderThread.Execute - Creating dir: ' + unitdir);
      {$ENDIF}
      fpgForceDirectories(unitDir);
    end;
  
    p := TProcess.Create(nil);
    p.Options := [poUsePipes, poStdErrToOutPut];
    p.ShowWindow := swoShowNormal;
    p.CurrentDirectory := GProject.ProjectDir;
  
  