News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Options controlling Fortran dialect

Started by jotg14, February 28, 2015, 12:20:21 AM

Previous topic - Next topic

jotg14

Hello,

I am using Code::Blocks in my Mac OS X  to write fortran90 codes, but when I try to build them an error appears on the Build log saying that the line has been truncated. As I'm a newbie in Code::Blocks I have looked for the answer in Google and I have found that I have to introduce:

-ffree-line-length-none or -ffixed-line-length-none (I am not sure which one is the correct) taking into account what this website says: https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

My question is: where and how have I to introduce this commands in order to solve this problem?

Thank you very much for your help.

cacb

I have never used Fortran under Code::Blocks (I used to code a lot of Fortran77 on VAX computers years ago). But I guess it is similar to C++ projects in this regard
Select your project, then use Project -> Build Options...

Under Compiler Settings you should have 3 tabs
Compiler options: See if your options are covered there first, if not go to "other options "
Other options: Here you can add additional compiler options, you could add "-ffree-line-length-none "  or whatever here
#defines: Probably not for Fortran

This procedure is per project & build target. There is also a possibility to set it for all projects/build targets via Settings -> Compiler...