fortran - Hide full path in gfortran run-time error messages -


i using gfortran compile big program dozen of modules. whenever there error in code program generates error message line number error has happened , full path of module line belongs to. example:

at line 1775 of file c:\temp\test.f90 (unit = 200, file=' ') fortran run time error: file '*' not exist 

my question how stop program listing full path of offending module , rather make report module name error has happened.

gfortran embeds path used access source file during compilation phase. e.g. if compile full path file full path in debug output. if compile relative path relative path in output:

~/tests[520]$ gfortran -o test.x test.f90 ~/tests[521]$ test.x @ line 3 of file test.f90 (unit = 200, file = '') fortran runtime error: file '' not exist  ~/tests[522]$ gfortran -o test.x ./test.f90 ~/tests[523]$ test.x @ line 3 of file ./test.f90 (unit = 200, file = '') fortran runtime error: file '' not exist  ~/tests[524]$ gfortran -o test.x ~/tests/test.f90 ~/tests[525]$ test.x @ line 3 of file /home/username/tests/test.f90 (unit = 200, file = '') fortran runtime error: file '' not exist 

change compilation commands access source using relative paths.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -