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:
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)?
Whoops! Looks as if that didn't get fixed - sorry!
The fix in user32.f90 is to change:
!DEC$ ATTRIBUTES REFERENCE, ALLOW_NULL :: lpClassName
!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!