[Fatal Error]

[Fatal Error] PING.PAS(1): Program or unit 'Ping.pas' recursively uses itself

What can be done to prevent this message.. and what to change to solve this
LVL 1
urosvAsked:
Who is Participating?
 
EpsylonConnect With a Mentor Commented:
Delphi 6 has it's own ping unit, I guess...
0
 
EpsylonCommented:
See if ping.pas has 'ping' in the uses clause somewhere...
0
 
EpsylonCommented:
If so, remove it of course.
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
urosvAuthor Commented:
unit Ping;

interface

uses
  Windows, Messages, SysUtils, Classes, Winsock, Icmp;

So The Ping UNIT Does not USE Ping...
0
 
EpsylonCommented:
There may be more than one uses clause per unit. Did you check that?
0
 
urosvAuthor Commented:
No there is only one USES Clause in this UNIT... this it the PING unit witch is called from main program called u_ping...

The u_PING uses ping in the uses clause but it should use it because it is needed by program...
0
 
EpsylonCommented:
Then I have no idea...
0
 
CrazyOneCommented:
How about doing a search on your app for the word Ping and see if it is being used in your code. I am not having this problem so I suspect your code is calling on in it some way that the compiler thinks is a recursive use of Ping. If you find nothing then try unistalling FPiette and install it as if you were installing it for the first time.


The Crazy One
0
 
feloniousCommented:
(since i dont know what the unit is, and haven't seen your code I'm kinda shooting in the dark here)

also you could try moving ping to a uses clause after implementation.

it also occures to me that maybe one of the units that ping has in it uses clause may also be using ping.  i think this could trigger that message.

other then that i also have no clue and would agree with The Crazy One and just start over with fresh code.

felonious
0
 
feloniousCommented:
i would also try changing the program name to something other then u_ping, just to cover all bases
0
 
joepeztCommented:
see if other units uses the ping.pas file
0
 
urosvAuthor Commented:
Hmm... i tryed something end its strange.... This error is become active ONLY in delphi6.. when i installed delphi5... there is no error whatsoever...

Any ideas...?
0
 
PaulKorzyckiCommented:
I had this problem too, and found that it was caused by when I was creating the package.  You can't call the package the same thing as the unit itself.  ie: in my case the unit was slider.pas, and when I tried slider.dpk it would give me that error...so I used slid.dpk instead.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.