Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

about compiler plugin for Fortran

(1/2) > >>

darmar:
Hello

I would like to add GNU Fortran compiler support in to C::B. I have looked a little bit into source code of C::B compiler plugin. It seems to me, to develop a separate plugin is much longer way, than to add additional one compiler to existing C::B compiler plugin.

I would like to ask the team of C::B if would be possible to add GNU Fortran compiler to existing compiler plugin?
I could try to contribute required code.

MortenMacFly:

--- Quote from: darmar on October 21, 2009, 05:24:19 pm ---I would like to ask the team of C::B if would be possible to add GNU Fortran compiler to existing compiler plugin?
I could try to contribute required code.

--- End quote ---
Sure. Contribution in that direction are welcome (I have to work with Fortran77, too from time to time).

But I am using the GNU MinGW fortran compiler just fine with the current framework. Even recent versions from TDragon Media or alike. Everything works nice. What exactly is what you have in mind.

darmar:
I just thinking about click/jump to the line with error in source code, and the compiler settings dialog.

MortenMacFly:

--- Quote from: darmar on October 21, 2009, 09:10:02 pm ---I just thinking about click/jump to the line with error in source code, and the compiler settings dialog.

--- End quote ---
You should be able to achieve that, too by modifying the already present GCC plugin's RegExes. This can be done either within the sources or even manually through the advanced compiler options in C::B. Notice that some of the present RegExes already work fine as the compiler messages are "similar enough" quite often.
However - a fortran-only compiler based somehwo on the GCC compiler might still be useful not to mix different aspects (languages).
All three options would still be of interest to me... I don't want to discourage you, I am just stating alternatives.

darmar:
I am trying to add GNU Fortran compiler to compiler plugin. I have two problems:
1) Most errors/warnings the Fortran compiler writes on 4 lines, like in example:
test.f90:69.21:
        integer  :: i
                     1
Warning: Unused variable 'i' declared at (1)
What is the best way to catch such messages?
My solution (may be not the best): I catch 1st line and mark it as 'cltInfo', and then I catch 4th line and mark it as 'cltWarning'(cltError if error). The drawback is that user get two messages on 'Build messages' window for each error/warning: one just with line number (and with possibility to jump to code line by clicking on it) and second message just with error/warning message (but without possibility to jump to code line). Example:
test.f90      69     test.f90
                     Warning: Unused variable 'i' declared
2) The second problem: when Fortran modules are used in user code, the compiler generate not only *.o file, but *.mod files too. When user hit Build->Clean, then *.o files are deleted but *.mod files are not.
How to delete *.mod files?
I haven't found solution for it, but may be, it is not so important because all project files are forced to be recompiled anyway.

Navigation

[0] Message Index

[#] Next page

Go to full version