Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Is DeleteFile an Intel-specific procedure?

Arjen_Markus
Honored Contributor II
448 Views
Hello,

we just ran into a strange problem: introducing a routine "DeleteFile" in a module
causes the compiler to complain that that name conflicts with a name in the encompassing scoping
unit. There is however no other routine or variable name like that in the entire program.

There is also no documentation of such a routine and we are not - as far as I can tell -
using any Intel specificmodule (could DeleteFile be the name of a Windows system function?)
At the point where this routine is used, we get the complaint that afunction isused as a
routine.

But in a small program, just defining a module andasubroutine by that name, the problem
does not occur.

We are using Intel Fortran 11.1.

We can easily change this name, that is no problem. I amsimply surprised that this occurs.

Regards,

Arjen
0 Kudos
2 Replies
anthonyrichards
New Contributor III
448 Views
According to http://msdn.microsoft.com/en-us/library/windows/desktop/aa363915%28v=vs.85%29.aspx,

DeleteFile exists in kernel32.lib

So maybe there is a clash when you USE KERNEL32 (included in USE IFWIN I think)
0 Kudos
Arjen_Markus
Honored Contributor II
448 Views
Bingo!

Somewhere deep down there is a use of kernel32 and user32 - I looked for IFWIN and IFPORT.

Thanks, that clears that question.

Arjen
0 Kudos
Reply