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

fatal error lnk1220 resolving static reference symbol requires /wowa64 specification

rmoortgat
New Contributor I
545 Views

Hello,

 

I'm trying to build programming example 'Menu1' from 'Compaq Visual Fortran' by Norman Lawrence.

Compiling with ifort goes fine, compiling with ifx gives me the following : "fatal error lnk1220 resolving static reference symbol requires /wowa64 specification"

 

Roger

0 Kudos
1 Solution
mecej4
Honored Contributor III
514 Views

According to the Porting Guide, Quickwin is supported in Version 2023.2 of IFX. Others have run into issues with older versions.

P.S. Using IFX 2024.1.0, with your inline code placed into file rmmenu.f90, I found that the following command produced a 64-bit EXE with no issues.

ifx /libs:qwin rmmenu.f90 CallBacks.f90

 

View solution in original post

6 Replies
mecej4
Honored Contributor III
538 Views

CVF can build 32-bit EXEs but not 64-bit..

Ifort can do 32- or 64-bit.

IFX can build 64- but not 32-bit EXEs.

0 Kudos
rmoortgat
New Contributor I
532 Views

OK. But what keeps me from compiling this source code as a 64-bit executable?

!****************************************************************
!
! Program Menu1:   Working menus in QuickWin 
!
! Written by: N. Lawrence     Date: 18/10/00 
!
! Last modified:  23/11/01
!
! Description:
!       This program demonstrates how to set up a loop
!       and wait for user events to occur such as input   
!       from a key.  It also shows how to create
!       customized menu items such as a user defined exit
!
! Contains:
!
! Main.f90    Create a message loop and wait for user events
! CallBacks.f90: Contains three Callback routines
!    Contains:
!       ChangeFocus:   Switch focus between two windows
!       UserExit:      Confirm exit from program
!       UserBeep:      Make beep sound
!
!****************************************************************
!
program Menu1
! How to customize the standard QuickWin menu
use dflib
use dfwin
use ifqwin
implicit none
external ChangeFocus,UserExit,UserBeep
integer(4) iret,unit
integer(4) ibackcolor,ifrontcolor
character(1) key / 'A' /
logical(4) bret
record /qwinfo/qw
   open(unit = 3, file = 'user', title = ' Child window 1'C)
!  set screen colors for window 1
   ibackcolor = rgb(255,255,255)  ! white
   ifrontcolor = rgb(0,0,0)       ! black 
   iret = SETBKCOLORRGB(ibackcolor) 
   iret = SETTEXTCOLORRGB(ifrontcolor) 
   call CLEARSCREEN($GCLEARSCREEN)
   write(3,*)'This file is unit 3'
   open(unit = 4, file = 'user',title = 'Child window 2'C)
!  set screen colors for window 2 
   iret = SETBKCOLORRGB(ibackcolor) 
   iret = SETTEXTCOLORRGB(ifrontcolor) 
   call CLEARSCREEN($GCLEARSCREEN)
   write(4,*)'This file is unit 4'
   iret = FOCUSQQ(3) 
!  set exit for no message 
   iret = SETEXITQQ(QWIN$EXITNOPERSIST)
!  maximize the size of the main window
   qw%type =QWIN$MAX
   iret = SETWSIZEQQ(QWIN$FRAMEWINDOW,qw)
!  Delete Exit from file menu
   bret = DELETEMENUQQ(1,3)
!  Allow Ctrl+C to be passed to GetKey function
   iret = PASSDIRKEYSQQ (PASS_DIR_CNTRLC ) 
!  insert separator bar and user exit menu
   bret = appendmenuqq(1, $MENUSEPARATOR, 'sep'C,  NUL)
   bret = appendmenuqq(1, $MENUENABLED, 'User  E&xit\tCtrl +X'C,UserExit)
!  Delete entire third menu (View)
   bret = deletemenuqq(3,0)
!  insert new menu at position 3 in the menu bar
   bret = INSERTMENUQQ(3, 0, $MENUENABLED, 'NewMenu'C, Nul)
   bret = appendmenuqq(3, $MENUGRAYED ,'Options'C, Nul)
   bret = appendmenuqq(3, $MENUENABLED , &
                         'Beep\tCtrl +B'C,UserBeep)
!  names of the child windows will be placed at the bottom
!  of the edit menu instead of the default window menu
   bret = SETWINDOWMENUQQ (3) 
!  Delete unwanted menu items in window menu
   bret = DELETEMENUQQ(5,5)
   bret = DELETEMENUQQ(5,4)
   bret = DELETEMENUQQ(5,3)
!  insert separator in window menu 
   bret = INSERTMENUQQ(5, 3, $MENUSEPARATOR, 'sep'C, Nul)
!  insert new menu item in window menu 
   bret = INSERTMENUQQ(5, 4,  ior($MENUENABLED , &
               $MENUCHECKED ),'Focus Unit 3'C, ChangeFocus)
!  insert separator in window menu 
   bret = INSERTMENUQQ(5, 5, $MENUSEPARATOR, 'sep'C, Nul)
!  simulate click of title menu to enlarge child window
   iret = CLICKMENUQQ (loc(WINTILE)) 
   do while (.true.)
!     Wait forever in this loop to permit event-driven action.
      key = GETCHARQQ()
      select case (ichar(key))
         case(2)
	        call UserBeep(.true.)  ! Ctrl+B selected
         case(3)
			iret = inqfocusqq(unit)  !  Ctrl+C selected
		    if(unit == 3) then
			   iret = FOCUSQQ(4) 
               iret = SETACTIVEQQ(4)
		       iret = PASSDIRKEYSQQ (PASS_DIR_CNTRLC ) 
			else
			   iret = FOCUSQQ(3) 
               iret = SETACTIVEQQ(3)
	           iret = PASSDIRKEYSQQ (PASS_DIR_CNTRLC ) 
	   	    end if
            iret = MESSAGEBOXQQ('Changing focus'C,'GetKey'C, &
		       MB$ICONEXCLAMATION .OR.MB$OK )
         case(24)
	        call UserExit(.true.)	! Ctrl+X selected
      end select
   end do	 
end

K. But what keeps me from compiling this source code as a 64-bit executable?

0 Kudos
mecej4
Honored Contributor III
515 Views

According to the Porting Guide, Quickwin is supported in Version 2023.2 of IFX. Others have run into issues with older versions.

P.S. Using IFX 2024.1.0, with your inline code placed into file rmmenu.f90, I found that the following command produced a 64-bit EXE with no issues.

ifx /libs:qwin rmmenu.f90 CallBacks.f90

 

rmoortgat
New Contributor I
504 Views

The first examples in the book compiled without a problem with ifx. This Menu example is the first that doesn't.

Roger

0 Kudos
Arjen_Markus
Honored Contributor I
445 Views

The errors you were getting were from the link step, not the compile step. There is an important difference here: you may have perfect source that can be compiled without any warning, but if it calls a function or subroutine that can not be found in the link step, for instance because you forgot to specfiy the library that contains it, the linker will complain.

You also have to release that 32-bits and 64-bits programs and libraries are incompatible. All parts of you program that go into the link step should be of the same bit size.

0 Kudos
rmoortgat
New Contributor I
419 Views

Problem solved.

Changed use dflib into use ifqwin.

 

Roger

Reply