This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Question on FORTRAN?
- To: cygwin users <gnu-win32 at cygnus dot com>
- Subject: Question on FORTRAN?
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Tue, 10 Nov 1998 05:26:15 -0800 (PST)
- Reply-To: earnie_boyd at yahoo dot com
I found on the web somewhere an example of a FORTRAN program using the
Win32 API. I was able to compile this program, but how do I get it to
link and run? Or is this just impossible with g77? Note, I was able
to get the DOS version of this program to execute properly.
This is the program:
----8<--------8<--------8<--------8<-------->8-------->8-------->8-------->8----
! Contouring Windows' "program" statements from section 1.2
integer function WinMain(hInstance,
& hPrevInstance, lpszCmdLine, nCmdShow)
!MS$ ATTRIBUTES STDCALL, ALIAS:'_WinMain@16'::WinMain
integer hInstance, hPrevInstance, lpszCmdLine, nCmdShow
! end of Windows' header
! DOS program body from section 1.1
real*4 a,b,c
character*7 input_file
input_file='1.0 2.0'
read(input_file,*) a,b
c = a + b
open(unit=1,file="result_file.txt")
write(1,"(f10.3)") c
close(1)
! end of DOS body
! the rest of Windows' contouring
WinMain=0
end
! end of program
----8<--------8<--------8<--------8<-------->8-------->8-------->8-------->8----
==
- \\||//
-------------o0O0--Earnie--0O0o--------------
-- earnie_boyd@yahoo.com --
-- http://www.freeyellow.com/members5/gw32 --
----------------ooo0O--O0ooo-----------------
PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".