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

Are IFWIN and IFPORT compatible?

pacobraxe
Beginner
777 Views
Hi, 

I wrote a module that uses IFWIN (to call CreateProcess) and IFPORT (to call systemqq). One subroutine of this module calls GetLastError and the compilation produces the following error:

Error: The same named entity from different modules and/or program units cannot be referenced. [GETLASTERROR]

Here it is a simplified version that retains the error:

module modulo_SO
use IFWIN
use IFPORT
implicit none
contains
subroutine exec_command()
integer :: res
res = getlasterror()
end subroutine
end module

Does anyone know whether IFWIN and IFPORT can be compatible?

Thanks,
Paco Braxe
0 Kudos
1 Solution
Steven_L_Intel1
Employee
777 Views
There are a few conflicts such as this one. You can use ONLY to pull in just the names you want (my preference in most cases) or use a renaming clause on the USE to rename the one you don't want out of the way.

My personal preference is also to use the individual modules such as KERNEL32 rather than IFWIN, which brings in a lot of baggage. Not that that would help in this case.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
778 Views
There are a few conflicts such as this one. You can use ONLY to pull in just the names you want (my preference in most cases) or use a renaming clause on the USE to rename the one you don't want out of the way.

My personal preference is also to use the individual modules such as KERNEL32 rather than IFWIN, which brings in a lot of baggage. Not that that would help in this case.
0 Kudos
Reply