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

compile error 8032 on IFWIN FindWindow call

Matthew_Nicoll
Beginner
459 Views

I am getting the following compile error:

B:\ios\FWinLib\ivf>ifort /c  /Qsave /nogen-interfaces /align:dcommons  ..\src\fi
nd_window.f90
Intel(R) Visual Fortran Compiler for applications running on IA-32, Version 16.0
.2.180 Build 20160204
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

ifort: NOTE: The evaluation period for this product ends on 18-may-2016 UTC.
..\src\find_window.f90(21): error #8032: Generic procedure reference has two or
more specific procedure with the same type/rank/keyword signature.   [FINDWINDOW
]
      ihandle = FindWindow(NULL,TITLE(1:L)//CHAR(0))
----------------^
compilation aborted for ..\src\find_window.f90 (code 1)

On the following Fortran code:

      INTEGER FUNCTION Find_Window(Title)

      USE DFWIN

      CHARACTER(*), INTENT(IN)  ::  Title       ! NOT null terminated

      INTEGER   L,ihandle     ! window handle 

      L = LEN_TRIM(TITLE)
      ihandle = FindWindow(NULL,TITLE(1:L)//CHAR(0))

      IF (ihandle == NULL) ihandle = 0    ! in case it is different

      Find_Window = ihandle

      RETURN
      END

This compiles fine in CVF 6.6.

In the following topic:

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/303421

Steve Lionel (Intel)  Fri, 02/01/2008 - 07:41 wrote:

 "Unfortunately, there is an error in the declaration in the module that makes the generic reference ambiguous. I'll have that fixed in a future release. "

Did that ever get fixed ?!

Should I call FindWindow_G1 instead ?

Is there a simple fix I can make in file user32.f90 (which contains the FindWindow interface declarations)?

 

 

0 Kudos
4 Replies
Steven_L_Intel1
Employee
459 Views

Whoops! Looks as if that didn't get fixed - sorry!

The fix in user32.f90 is to change:

!DEC$ ATTRIBUTES REFERENCE, ALLOW_NULL :: lpClassName

to:

!DEC$ ATTRIBUTES REFERENCE :: lpClassName

In the declaration of FindWindow_G1. You could also call FindWindow_G1 if you wanted to.

If you change USER32.f90 I suggest copying it to your project and editing it there.

I will make sure this gets fixed for sure!

0 Kudos
Matthew_Nicoll
Beginner
459 Views

Thanks Steve.  That change in user32.f90 fixed it.

0 Kudos
Steven_L_Intel1
Employee
459 Views

This time for sure - escalated as issue DPD200410776.

0 Kudos
Steven_L_Intel1
Employee
459 Views

Fixed for 17.0 product.

0 Kudos
Reply