Redirecting error messages.

Redirecting error messages.

I need to capture runtime error messages to a file. The documentation for Fortran says that I can do this with simple redirection, i.e.

c:> foo.exe >>errors.txt

When I try this, error messages still are sent to the console. The file "errors.txt " is created, but is always empty.

How can I get this to work?

Thanks,
Chuck Smythe

5 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Steve Lionel (Intel)

Try appending "2>&1" (without the quotes) to your command line. This says to redirect standard error to standard output. Note that Windows 9x doesn't accept this.

Steve

Steve

Help!

The list of messages indicates that "Steve L." replied to my previous question, but I can't find a way to read this reply, or any other...when I click on the message, it opens the original message, not the reply.

Also, I requested the reply to be e-mailed, and it didn't happen. My user profile looks correct.

Can someone tell me how to read these replies? (Maybe e-mail me, since I don't know how to read your reply!)

Thanks,
Chuck Smythe
csmythe@webaccess.net

Sorry, I need to follow this up again.
I was able to read the replies by using "format for printing". A Netscape problem?
I tried appending 2>&1 to the command line (Win98 machine). It doesn't cause an error message, but now "errors.txt" is not created. Runtime error are still sent to the console.
I need a solution to this that will work under all flavors of Windows. If simple redirection in the DOS environment isn't possible, is there some way to attach stderr, or whatever VF calls it, to an I/O unit within the code, then force that to write to a file on failure? The documentation describes a way to do this for floating point errors, but seems to say that it won't work for other run-time errors.

Thanks,
Chuck

Ritratto di Steve Lionel (Intel)

Yes, it's Netscape. I've reported the problem. but Netscape 6.x works.

Windows 98 doesn't support this redirection, but on the CVF CD you'll find a USUPPORT folder which contains an EC utility that can be used to get it. Run EC by itself to have it display usage. Early 5.0 CDs didn't have this, so you can also get the utilities from here.

Steve

Steve

Accedere per lasciare un commento.