求助!(100分)

  • 主题发起人 zswenyun
  • 开始时间
Z

zswenyun

Unregistered / Unconfirmed
GUEST, unregistred user!
unit Cryptcon;
interface
uses
System,Windows,SysUtils,Classes, Controls;
............
中出现错误[Error] Cryptcon.pas(6): Identifier redeclared: 'System'
这是为什么,怎么解决?System单元好象无法象Windows之类的一样使用
 
tools->library-library path -> add ->增加“$(DELPHI)/Lib”点add后,一路确定,ok
 
你把uses中的system去掉就行了,Delphi中单元是不能循环引用的,如果A引用了B,B又引
用了C,则C不能再引用A,否则就会出现这种错误。
  另外System好像没有必要加在Uses中吧,在所有的Delphi单元都可以直接引用System中
的方法。
 
对,楼上说的不错,不需要引用System单元的,我也犯过这个错。
 
谢谢Perseus,笑傲Delphi兄的答复
 
unit System;
{ Predefined constants, types, procedures, }
{ and functions (such as True, Integer, or }
{ Writeln)do
not have actual declarations.}
{ Instead they are built into the compiler }
{ and are treated as if they were declared }
{ at the begin
ning of the System unit. }
 

Similar threads

D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
769
SUNSTONE的Delphi笔记
S
顶部