User forums > Using Code::Blocks
gfortran Compiler Options File
DoctorRad:
Hi folks,
I am trying to add a couple of extra compiler options to the GNU Fortran Compiler, so have added the following section to options_gfortran.xml:
--- Code: (xml) --- <Category name="Misc">
<Option name="Do not append underscores to names of entities specified in the Fortran source file"
option="-fno-underscoring"/>
<Option name="Use a different function-calling convention"
option="-mrtd"/>
</Category>
--- End code ---
It does not appear that this is being picked up when I re-start C::B (Windows v16.01).
Can anyone help sort out what might be wrong? There does not appear to be a separate Compiler File (compiler_*.xml) specifically for gfortran, and it appears that the options_gfortran.xml file is being ignored.
Many thanks,
Dr. Matt...
gd_on:
Hi,
I tried to add your lines in my options_gfortran.xml (in my C:\Program Files (x86)\CodeBlocks\share\CodeBlocks\compilers folder).
It works as expected : new options appear in my fortran compiler options.
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.
cordially,
gd_on
oBFusCATed:
Have you tried to use UI in the complier options dialog?
Right click -> Add new flag or something like this.
DoctorRad:
--- 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?
Best wishes,
Dr. Matt...
DoctorRad:
--- Quote from: oBFusCATed on November 09, 2016, 07:59:45 pm ---Have you tried to use UI in the complier options dialog?
Right click -> Add new flag or something like this.
--- End quote ---
Yes, I've tried this, but the user interface does not allow you to add a new category of flags from what I can see.
Can you also tell me, if I do add new flags using the user interface, in which configuration file they should appear?
Many thanks,
Dr. Matt...
Navigation
[0] Message Index
[#] Next page
Go to full version