User forums > Using Code::Blocks

gfortran Compiler Options File

<< < (2/2)

gd_on:

--- Quote from: DoctorRad on November 10, 2016, 10:31:47 am ---
--- Quote from: gd_on on November 09, 2016, 07:53:34 pm ---I had a problem with my 64 bits version because my configuration for gfortran 64 was based on gcc. But, I rebuilt it from standard gfortran, and it also works now. So, there is something wrong in your configuration, but it should work.

--- End quote ---
Many thanks for your response. Could you talk me through 'rebuilding from standard gfortran' or point me in the direction of a guide? What do you mean by 'standard' gfortran?

--- End quote ---

I'm not sure if gfortran configuration was already included in 16.01 version. I use myself a nightly svn version (and more a version that I build myself with the distributed .workspace file, but it's not necessary: last distributed nightlies should be OK for Windows or Linux). In that case, when I choose a compiler for a fortran source, in Settings / Compiler..., I click on the first top button under "Selected Compiler" and choose GNU fortran compiler which is almost at the bottom of the list. This is this setting that I call standard gfortran (may be I should say "distributed version").
So, I choosed this version, which has a "Fortran Dialect" category, then copy it (with the "Copy" button"), and modified the copy to obtain a 64 bit setting for gfortran.

gd_on

oBFusCATed:

--- Quote from: DoctorRad on November 10, 2016, 10:33:28 am ---Can you also tell me, if I do add new flags using the user interface, in which configuration file they should appear?

--- End quote ---
Somewhere next to the default.conf file. It is some xml file.

DoctorRad:

--- Quote from: oBFusCATed on November 10, 2016, 09:19:58 pm ---Somewhere next to the default.conf file. It is some xml file.

--- End quote ---
Many thanks, I found it now, a modified options_gfortran.xml file is in my AppData folder, not with the main application files.

In keeping with the style of that file, I added the following two lines:


--- Code: (XML) ---  <Option name="Do not append underscores to names of entities specified in the Fortran source file" option="-fno-underscoring" category="Misc"/>
  <Option name="Use a different function-calling convention" option="-mrtd" category="Misc"/>
--- End code ---

...and the two options now appear in their own 'Misc' category as expected.

Navigation

[0] Message Index

[*] Previous page

Go to full version