Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

SETBKCOLOR

Brian_C_
New Contributor I
357 Views

SETBKCOLOR is included in IFQWIN otherwise my code would not compile with the Fortran compiler in oneAPI, but it gives me unresolved exterrnals in the linker.  Has someone messed up IFQWIN when they included it with oneAPI?  3 other subroutines are  similar in my outputs:

Severity Code Description Project File Line Suppression State
Error error LNK2019: unresolved external symbol __getbkcolor referenced in function _KBCHECK EZSUBS.obj
Error error LNK2019: unresolved external symbol __setbkcolor referenced in function _KBCHECK EZSUBS.obj
Error error LNK2019: unresolved external symbol __settextcursor referenced in function _MYCURSOR EZSCREEN.obj
Error error LNK2019: unresolved external symbol __setvideomode referenced in function _VIDERROR EZSUBS.obj
Error fatal error LNK1120: 4 unresolved externals Debug\HANDYSUBS.exe

and now the source code:

SUBROUTINE KBCheck(jaction)
!
! This subroutine checks for keyboard input during a task
! so the user can cause an immediate return to the main menu
USE EZVARS !which includes USE IFQWIN
IMPLICIT NONE
Logical*4 pressed
INTEGER jaction,iprev,dummy4,ired

pressed=PEEKCHARQQ() !check for recent keypress
If(.not. pressed) Then !user press a key?
jaction=0 !nOP...no action
Else
jaction=1 !yes..set action flag
Call MyBeep !sound an alert
iprev=GETBKCOLOR() !get present background color
dummy4=SETBKCOLOR (ired) !set background color to red
WRITE(mon,910) ' Task stopped due to keypress '
910 Format(a,a,a,a,a)
CALL MyOText(mon) !show what happenned
dummy4=SETBKCOLOR(iprev) !set background to previous color
ENDIF
Return !Adios
End

Labels (1)
0 Kudos
1 Solution
Brian_C_
New Contributor I
292 Views

Steve's code proved that setbkcolor is provided correctly but I have a wrong setting.

I created a new Quickwin project and imported my code and now it all works.

I still remember creating that bad project as a Quickwin project, though.  

Time to let it go.  Thanks to both of your.

 

View solution in original post

4 Replies
Alberto_Sykes
Employee
333 Views

Brian_C, Thank you for posting in the Intel® Communities Support.


In order for us to be able to provide the most accurate assistance on this matter, I will move your thread to the proper department so they can further assist you with this topic as soon as possible.


Regards,

Albert R.


Intel Customer Support Technician

A Contingent Worker at Intel


andrew_4619
Honored Contributor I
322 Views

Does your compile command line have  /libs:qwin on it?  USE IFQWIN I don't think is enough because the module bizarrely does not have the required OBJCOMMENT to include the required lib. There is probs a good reason for that but I don't know what it is, maybe compatibility with some older MS lib or whatever.

Steve_Lionel
Black Belt Retired Employee
318 Views

What Andrew said...

D:\Projects>type t.f90
use ifqwin
i = GETBKCOLOR()
j = SETBKCOLOR(i)
end
D:\Projects>ifort /libs:qwin t.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.1 Build 20201112_000000
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

Microsoft (R) Incremental Linker Version 14.28.29335.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:t.exe
-subsystem:windows
t.obj

D:\Projects>ifort
Brian_C_
New Contributor I
293 Views

Steve's code proved that setbkcolor is provided correctly but I have a wrong setting.

I created a new Quickwin project and imported my code and now it all works.

I still remember creating that bad project as a Quickwin project, though.  

Time to let it go.  Thanks to both of your.

 

View solution in original post

Reply