Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran executable problem on Windows 7

Status
Not open for further replies.

adam1fac

Programmer
Dec 6, 2011
2
GB
Hi,

I am an engineer and only write Fortran programs as and when required. In the past I have used Linux to create my code but in my present job I am using Windows 7. I only need to create a cmd line program to perform some calculations but I have a really basic problem that everytime I create an executable and run it, the cmd prompt instantly closes. This occurs even with a Hello World program!

I can see it completes the statetment in the code, it just closes the cmd prompt before I can see the output. I have have the same problem on either Windows 7 32 or 64bit, using either ifort or g95 compilers. Does anybody know how I can resolve this?

Thanks,
Adam
 
Either
open Command Prompt and run you executable from it
or redirect the program output to the file, e.g:
your_pgm.exe > results.txt
 
Ah ok, thanks milkrom. THat has resolved my issue now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top