Autor Beitrag
ebs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Fr 24.06.05 22:09 
Mal eine kurze Frage :wink: :
Ich habe mit Delphi 2005 ein Projekt von Delphi 3 geladen. Nun wollte ich das compilieren, un der wirft mir folgende Fehlermeldung raus:
ausblenden Quelltext
1:
[Warnung] W1031 Package 'Primzahl' wird nicht auf Platte geschrieben, da die Option  -J aktiviert ist					

Wo kann ich denn diese Option -J ändern?

Danke :D


Moderiert von user profile iconGausi: Topic aus Sonstiges verschoben am Sa 25.06.2005 um 11:12
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Sa 25.06.05 11:09 
da ist eine compileranweisung mit der du einstellst ob du typisierte konstanten ändern kanns oder nicht.

unter "projektoptionen" kannst du unter dem tab compiler die option
"Zuweisbare typisierte Konstanten" (eng: Assignable typed constant) deaktivieren.

hier nochmal die delphi hilfe:
Delphi Hilfe hat folgendes geschrieben:

Writeable typed constants

Type Switch
Syntax {$J+} or {$J-}
{$WRITEABLECONST ON} or {$WRITEABLECONST OFF}
Default {$J-}
{$WRITEABLECONST OFF}
Scope Local

The $J directive controls whether typed constants can be modified or not. In the {$J+} state, typed constants can be modified, and are in essence initialized variables. In the {$J-} state, typed constants are truly constant, and any attempt to modify a typed constant causes the compiler to report an error.
Writeable consts refers to the use of a typed const as a variable modifiable at runtime. For example:

const
foo: Integer = 12;
begin
foo := 14;
end.

With $WRITEABLECONST OFF, this code produces a compile error on the assignment to the foo variable in the begin..end block. To fix it, change the const declaration to a var declaration.

In previous versions of Delphi and Borland Pascal, typed constants were always writeable, corresponding to the {$J+} state. Old source code that uses writeable typed constants must be compiled in the {$J+} state, but for new applications it is recommended that you use initialized variables and compile your code in the {$J-} state.

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 11:38 
Die Fehlermeldung ist weg, aber jetzt wird mein Programm überhauptnichtmehr erstellt. Noch nicht einmal eine Fehlermeldung :evil:
Was kann das den jetzt für Gründe haben :?:


Zuletzt bearbeitet von ebs am Sa 25.06.05 11:44, insgesamt 1-mal bearbeitet
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 13:50 
Mist! :evil: :evil:
Die Fehlermeldung ist doch nicht weg, sondern war nur unterdrückt. Ich habe jetzt sogar schän Delphi deinstalliert, und neu installiert. Ich vermute, dass deshalb kein Programm erstellt wird.
JayK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1013



BeitragVerfasst: Sa 25.06.05 13:55 
user profile iconebs hat folgendes geschrieben:
folgende Fehlermeldung raus:
ausblenden Quelltext
1:
[Warnung] W1031 Package 'Primzahl' wird nicht auf Platte geschrieben, da die Option  -J aktiviert ist					


Ist doch keine Fehlermeldung. Ist nur eine Warnung. Das Prog sollte trotzdem erstellt werden. Wieso eigentlich "Package"? Ich dachte du hast ein Projekt??
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 14:58 
Das verstehe ich auch nicht warum das ein Package sein soll. Aber selbst wenn ich ein ganz neues Projekt starte, kommt diese Meldung, und nichts wird erstellt.
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Sa 25.06.05 15:12 
Er legt auch keine Exe-Datei ab, aslo in den Ordner wo du das Projekt davor gespeicherst hast?
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 15:30 
Genau, so ist es :evil:
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Sa 25.06.05 15:59 
Reagiert er auf Haltepunkte in der Projektdatei? Am besten gib uns mal das Programm, damit wir selber testetn können (habe ja auch D2k5).
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 16:10 
Er reagiert auch nicht auf Haltepunkte. Ist ist ja uch so, dass selbst wenn ich ein neues Programm erstelle, weigert er sich. Kann das vieleicht etwas mit den Pfaden zu tun haben?

Trozdem, einmal das leere Programm:
Einloggen, um Attachments anzusehen!
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Sa 25.06.05 16:24 
Bei mir ist das bei deinem Projekt auch. Ich habe es aber zum laufen bekommen ;). Bevor du das Projekt öffnest, lösche alle Dateien vom Projekt, die nicht dringend benötigt werden (so das nur noch *.dfm, *.pas übrigbelibt, wenn ich mich irre ;)). Danach läuft es. Allerdings musst du evtl die Eigenschaften im Obejektinspektor neu setzten.
JayK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1013



BeitragVerfasst: Sa 25.06.05 17:08 
user profile iconHeiko hat folgendes geschrieben:
(so das nur noch *.dfm, *.pas übrigbelibt, wenn ich mich irre ;))

und *.dpr (und ggf. *.bds). Die *.res zu behalten empfielt sich auch, die erstellt er sonst auch einfach neu.
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 17:11 
Ich habe alles gelöscht, und nur .pas und .dfm dagelassen. Danach alles in ein neues Projekt gesteckt, aber es läuft immer noch nicht :evil:
ebs Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Sa 25.06.05 18:06 
Ich habs geschafft!!! :) :) :D :D
Es war folgendes falsch:

In den Projektoptionen war bei Linker :arrow: Linker Ausgabe C-Objektdateien erzeugen, es musste aber auf DCUs gestellt sein.

Trozdem Danke! :D