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

Quickwin Application without windows

belsim
Beginner
686 Views
Is there a possibility for a Quickwin application to start without opening any window ?
If not what kind of application should I do to avoid the console opening ?
0 Kudos
4 Replies
isn-removed200637
686 Views
Well, IIRC, a QuickWin application, by definition, opens a frame window.
So what you appear to want is not a QuickWin application.
Here is the simplest one I can think of.
Just do not try to write to streams 5 or 6,
or read from stream 5, because that presupposes
the existence of a console window to write to or
read from.
This program runs and creates a log file
with the simplest of output message.
INTEGER(4) function WinMain ( hInstance, hPrevInstance, &
         lpszCmdLine, nCmdShow )
!DEC$ ATTRIBUTES STDCALL, ALIAS:'_WinMain@16' :: WinMain
INTEGER(4), INTENT(IN) :: hInstance, hPrevInstance
INTEGER(4), INTENT(IN) :: lpszCmdLine
INTEGER(4), INTENT(IN) :: nCmdShow
open (2, file='logfile.lis', status='unknown')
write(2,*) 'Hello world'
close (2)
WINMAIN = 1
END FUNCTION WINMAIN
0 Kudos
jrmh
Beginner
686 Views
To suppress the console, use the linker option /SUBSYSTEM:WINDOWS
0 Kudos
gregscvf
Beginner
686 Views
What you probably are doing is performing all your I/O using files, so you do not want a window of any form (Console, QuickWin, etc.). You may also try using a Standard Graphics Application, and as AnthonyRichards indicates, avoid all I/O to 5, and 6.
0 Kudos
Steven_L_Intel1
Employee
686 Views
If you indeed want a program with no user interface, a "Fortran Windows Application" is the correct choice. Instead of a main program, the entry point is a WinMain routine. Let the CVF wizard create a sample application for you, then remove all of the windows code.

Standard Graphics gives you a single large window - probably not right. And simply saying /subsystem:windows is not sufficient.

Steve
0 Kudos
Reply