News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

How can C::B catch gFortran compilation error?

Started by xunxun, November 03, 2010, 12:58:52 PM

Previous topic - Next topic

xunxun

I want to let C::B catch the Fortran error, how can I do it?  
For example,

program main
 implicit none

 write(*,*) "Hello World!"

// stop
end program

the code above can show the errors below:

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)

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

(.*Error.*)

can only catch the line

Error: Invalid character in name at (1)

and I use the rule below

.*:([0-9]).*

can only catch the line

E:\MyProjects\test\dfvf\main.f90:6.2:

but I use the rule below

.*:([0-9]).*(Error.*)

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!
Regards,
xunxun