This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: GFortran for 64-bit PC


---------- Forwarded message ----------
From: Erik Toussaint <eh.toussaint@gmail.com>
Date: 2011/3/16
Subject: Re: GFortran for 64-bit PC
To: Norbert <npittner@cox.net>


2011/3/13 Norbert <npittner@cox.net>
>
> Hi,
> Recently I bought a new desktop PC (HP6654y, Athlon II processor, 64-bit, with Windows 7) and downloaded
> the free GCC-GNU GFortran compiler for it, from http://quatramaran.ens.fr/~coudert/gfortran/ ? ,
> following instructions to the letter. After 'doing' Fortran for nearly 50 years (!!), I still have a
> lot of stuff I need to do with it every day.
> The first dozen or so programs I tried out on this GFortran (= Fortran 2003) were 'small' (around 1200
> ASCII characters each) and worked perfectly: they compiled, linked, executed, and ran (linked) just fine.
> All that was needed was the command 'gfortran -o xyz.f', where xyz is the name of my source code file.
> But the Fortran programs I really need to run are about twenty times larger (25000 ASCII characters each)
> than those dozen trial balloons above. The big programs will compile OK (no syntax or logic errors etc),
> but they will not run. My GFortran gives me runtime errors like 'c:\Users\mememe\AppData\Local\Temp\
> ccM8j0Ey.o: xyz.f:.text+0x360a): undefined reference to '_array_' ', were mememe is my administrator name,
> xyz is the source module again, and array is the name I gave to a dimensioned character array in that
> ASCII source file; there is also a message 'Collect2; Id returned 1 exit status'.
> Next I experimented with inserting various link parameter combinations after the -o in the above gfortran
> command, such as -Wextra or -Wall or -O2 or -g or -static or -march or -libgfortran etc, all to no avail.
> (I am not a 'professional developer'.)
> (By the way, Gfortran, along with mingwm10.dll etc etc resides in my ProgramFiles(x86) folder.)
> I get the impression that gfortran wants some C+ modules (?), or runtime libraries, or 'binaries' (?)
> like maybe MinGW or Cypwin or whatever. It just will not TELL me what I need, where to get it, and into
> which folders on my PC to put them. It's nerve wracking!
> Please help.
> Thank you.
> 'Max'
>

You're describing the problem, instead of showing it. This can only
lead to guesses as to what the exact problem is and similar guesses to
a possible solution. If you want meaningful help, show us exactly what
commands you used and what error messages you got. (The one command
you showed is not exactly what you used, because it won't work in the
form you wrote here; the '-o' option should be followed by the name of
the output file, not the input file.) If possible even include the
source code, or even better a cut down version of it which exhibits
the same problem, so others can try and compile it, to see if there
are mistakes in the code, or if it really is just a faulty gfortran
invokation.

You say the big programs will compile, but they won't run. The error
you show, however, looks like an error in the step between compilation
and running, namely the linking step. This step takes the separate
object files created by the compilation step (files ending in .o) and
puts them together to create an executable file (assuming you're not
creating a library or dll).

The 'undefined reference' error seems to indicate that a function,
named array, is being referenced and not found. This points to an
error in the code, but without seeing it I can't be sure.

Erik.
P.s.: gfortran 'is' not yet Fortran 2003. It's getting close, but some
parts are still missing.


Edit:
Sorry, I meant to sent this to the list, but instead just sent it to
the OP, so I'm forwarding it to the list now.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]