main.o(.text+0x29e): undefined reference to `getarg_
Janne Blomqvist
jblomqvi@cc.hut.fi
Wed Feb 16 12:38:00 GMT 2005
On Wed, Feb 16, 2005 at 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. As it is, gfortran
getarg/iargc is supposed to be compatible with the g77 implementation.
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.
--
Janne Blomqvist
More information about the Fortran
mailing list