main.o(.text+0x29e): undefined reference to `getarg_
Satish Balay
balay@fastmail.fm
Tue Feb 22 19:19:00 GMT 2005
On Wed, 16 Feb 2005, Janne Blomqvist wrote:
> On Wed, Feb 16, 2005@10:36:57AM +0100, Daniel Heiserer wrote:
> > However the iargc() counter is treated different (+1 with gfortran) in
> > both compilers. What is "right"?
>
> > I do not care about g77 combatibility as long as the gfortran works
> > along the standard.
>
> And which standard might that be? AFAIK getarg/iargc is not defined in
> any standard (although they are fairly widely supported extensions),
> so gfortran can implement them any way it pleases.
Why change this - and break existing codes?
> As it is, gfortran getarg/iargc is supposed to be compatible with
> the g77 implementation.
Currently its not [as the above indicates]
>
> If you want something that conforms to a published standard, F2003
> introduced the command_argument_count and get_command_argument
> intrinsics. These intrinsics are implemented in gfortran.
BTW: command_argument_count() matches gcc-3.4 iargc() [i.e number of
arguments] but current gfortran iargc() gives 'no-of-arguments + 1'
[which is the way on c-side of things with argc/argv.
Satish
More information about the Fortran
mailing list