The following lin is used to compile an executable from the Fortran source code
gfortran -funderscoring -O3 -Wall -c -fmessage-length=0 -o "src/abc.o" "../src/abc.f"
When I run my program in command prompt and errors occur, it will show runtime errors in the command prompt (see the runtime error example below). I want to disable the display of the runtime errors as I am worried that this will reveal the source code. How can I do that?
At line 429 of file ../src/abc.f (unit = 5, file = 'stdin') Fortran runtime error: Bad value during integer read Error termination. Backtrace: Could not print backtrace: libbacktrace could not find executable to open #0 0xffffffff #1 0xffffffff #2 0xffffffff #3 0xffffffff #4 0xffffffff #5 0xffffffff #6 0xffffffff #7 0xffffffff #8 0xffffffff #9 0xffffffff #10 0xffffffff #11 0xffffffff #12 0xffffffff #13 0xffffffff
I am not aware of any such option and I am not useful of its usefulness anyway. Fortran rewuires an error condition to be handled eventhough it does not prescribe the form of the message.
You can always use the
err= specifiers to handle the error conditions yourself in anu way you like.
User contributions licensed under CC BY-SA 3.0