Fortran program does not work in gfortran

Asked 1 years ago, Updated 1 years ago, 97 views

Below is the error message. Please tell me what's wrong, thank you.

E:\gfortran>echo off
Microsoft Windows [Version 10.0.19042.1083]
(c) Microsoft Corporation.All rights reserved.

E:\gfortran>gfortran PSBaseline.f90
gfortran:error:PSBaseline.f90:No such file or directory

E:\gfortran>gfortran PSSBaseline.f90
PSSBaseline.f 90:68:132:

       REAL(8):: TradeGood, TradeGoodSec, TradeObj, TradeObjSec, MintObj, MintObjBuyer, MintObjSeller, MintGain, MintGainBuyer, MintGainSeller, DV_B, DV_S, BuyerGain
                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
PSSBaseline.f90:122:4:

 USE Variables
    1
Fatal Error: Can't open module file'variables.mod' for reading at (1): No such file or directory
f951.exe —Some warnings being created as errors
compilation terminated.

E:\gfortran>

fortran

2022-09-29 22:00

1 Answers

As stated in the error message, it should remain the same.

Error because variable names are listed beyond the valid range of 132 digits since Fortran 90.

-Werror=line-truncation If you remove this option, it will fall out of the standard, but the compiler's proprietary extension will increase the number of valid characters per line, so it will only be a warning.


2022-09-29 22:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.