Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Tue, 20 May 2008 22:02:43 -0500
Ikke wrote:
Hi everybody,
I'm trying to delete a file in a Delphi console application. Everything works fine and the project compiles, except for one hint which I do not understand:
[Pascal Hint] project.dpr(102): H2443 Inline function 'DeleteFile' has not been expanded because unit 'Windows' is not specified in USES list
If I try to add the Windows unit, I get all sorts of errors on other lines.
Can anybody explain to me what this means?
It means exactly what it says. The Windows unit has b=not been used, so the compiler cannot expand the inline function DeleteFile.
To resolve the warning, either disable inline warnings or add the Windows unit to your unit's "uses" clause.
Adding the Windows unit introduces lots of new identifiers into the current scope. The "all sorts of errors" you got probably had to do with identifiers that are in Windows that are also in other units. DeleteFile is in both Windows and SysUtils, for instance. TBitmap is in Windows and Graphics. You can resolve the issue by fully specifying which names you need, such as "Graphics.TBitmap". You can also adjust the order of the used units; units are searched for identifiers in reverse of the order tey appear in the "uses" clause. You probably added Windows to the end of your "uses" clause, so all of its identifiers suddenly took precedence over the other identifiers in your code.
--
Rob
.
- References:
- Prev by Date: Weird array statement in loop.
- Next by Date: Re: Use pdf as background for form
- Previous by thread: Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- Next by thread: Weird array statement in loop.
- Index(es):
Relevant Pages
|