Autor Beitrag
Barzi
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 13.01.07 19:57 
Moin, ich habe ein Projekt in Delphi 2005 begonnen und will es nun mit Delphi 7 weiter entwickeln. Allerdings meldet der Compiler von Delphi 7 nur Fehler. Gibt es eine Möglichkeit die Projekte abwärtskompatibel zu speichern? Oder habt ihr sonst eine Idee?

Barzi
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.01.07 20:08 
Tja, was für Fehler denn? Von Delphi 2005 zu Delphi 7 gibt es vom Compiler her eigentlich keine besonderen Meldungen.
Lediglich wenn du ein Formular öffnest, dann kommen Meldungen, dass bestimmte Eigenschaften nicht gefunden werden können. Aber das ist normal. Du musst auf jeden Fall einmal in Delphi alle Formulare öffnen und dann das ganze Speichern.
Wenn dabei Eigenschaften nicht gefunden werden, dann ist das wohl ok. Und wenn Komponenten fehlen, dann musst du die eben installieren.

Aber sag mal erstmal, was für Fehler das sind!
Barzi
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 13.01.07 22:30 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
  
  public
    { Public-Deklarationen }
    VAR Sprache1,Sprache2:String;
  end;

Hier sagt der Compiler "'End' erwartet aber 'VAR' gefunden ...

Dann meldet er noch "'implementation' erwartet aber ';' .... ach was solls ich hab hier mal das ganze Fehlerprotokoll ... wenn dir das hilft:

Build
[Error] Unit1.pas(27): 'END' expected but 'VAR' found
[Error] Unit1.pas(28): 'IMPLEMENTATION' expected but ';' found
[Error] Unit1.pas(33): '.' expected but 'IMPLEMENTATION' found
[Error] Unit1.pas(16): Unsatisfied forward or external declaration: 'TForm1.SpeedButton3MouseMove'
[Error] Unit1.pas(18): Unsatisfied forward or external declaration: 'TForm1.SpeedButton2MouseMove'
[Error] Unit1.pas(20): Unsatisfied forward or external declaration: 'TForm1.SpeedButton1MouseMove'
[Error] Unit1.pas(22): Unsatisfied forward or external declaration: 'TForm1.SpeedButton1Click'
[Fatal Error] Project1.dpr(6): Could not compile used unit 'Unit1.pas'
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.01.07 22:44 
Das soll sich in Delphi 2005 kompilieren lassen??? Das kann ich mir kaum vorstellen ;-)

Nimm mal das var weg... Das sind schonmal die ersten drei Fehlermeldungen.
Das hat aber mit dem "Unsatisfied forward or external declaration" nix zu tun... Wenn es ohne das var immer noch nicht geht, dann musst du einfach die Zeilen mit den Fehlern löschen. Nämlich die, wo SpeedButton3MouseMove und so deklariert sind.
Barzi
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 13.01.07 22:54 
Es lässt sich in Delphi 2005 compilen :D
Ich habe das Problem jetzt auch gelöst. Die hälfte des Projektes gelöscht und noch mal neu Programmiert :D
Trotzdem danke für eure Hilfe ...
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 13.01.07 23:03 
Ok, ich habs ausprobiert. Du hast Recht. ;-) Das geht ab Delphi 2005 tatsächlich mit var innerhalb der Formulardeklaration. Man lernt nie aus...

Das hier geht wirklich :lol:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
  TForm1 = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
    var x: String;
    const a: Integer = 0;
  end;

Das hab ich nicht mitbekommen als neues Feature...