User forums > Help
How can C::B catch gFortran compilation error?
(1/1)
xunxun:
I want to let C::B catch the Fortran error, how can I do it?
For example,
--- Code: ---program main
implicit none
write(*,*) "Hello World!"
// stop
end program
--- End code ---
the code above can show the errors below:
--- Code: ---E:\MyProjects\test\dfvf\main.f90:6.2:
// stop
1
Error: Invalid character in name at (1)
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
--- End code ---
The line "// stop" is an error, and that should be "stop".
I know C::B have Advanced compiler Options-Output parsing, but after using some regex rules, the C::B can only catch one row information, and the errors above have 4 rows.
For example, I use the rule below
--- Code: ---(.*Error.*)
--- End code ---
can only catch the line
--- Code: ---Error: Invalid character in name at (1)
--- End code ---
and I use the rule below
--- Code: ---.*:([0-9]).*
--- End code ---
can only catch the line
--- Code: ---E:\MyProjects\test\dfvf\main.f90:6.2:
--- End code ---
but I use the rule below
--- Code: ---.*:([0-9]).*(Error.*)
--- End code ---
that caches nothing. :?
I think the C::B's error cathing can catch only one line, isn't it?
But how can I catch more lines error, because one fortran error returns four rows information. :(
Thank you!
Navigation
[0] Message Index
Go to full version