Getting link error with iargc/-J option

Ray Nachlinger ray@ultramarine.com
Wed Jan 10 20:23:00 GMT 2007


On Wed, 10 Jan 2007, Steve Kargl wrote:

> On Wed, Jan 10, 2007 at 01:12:12PM -0600, Ray Nachlinger wrote:
> > On Wed, 10 Jan 2007, Paul T. Bauman wrote:
> > 
> > > Added '-fall-intrinsics' to my command line options, but still the same
> > > problem.  Would I need to recompile MPICH/PETSc with this option?
> > > 
> > > Add -Iobj fixed the second problem.
> > > 
> > 
> >   You may have the following problem.
> > 
> >       external iargc
> >       i = iargc()
> >       end
> > 
> >   Has the problem you have, but
> > 
> >       i = iargc()
> >       end
> > 
> >   does not. I believe that these intrinsics were converted
> >   to be inline, but simply know it worked for me.
> > 
> 
> No, it is not inlined.  libgfortran tries to separate its
> library namespace from the user's namespace.  Without the
> "external iargc", gfortran translates iargc to _gfortran_iargc_
> (ie., the libgfortran's routine).  With "external iargc" gfortran
> is expecting the user to supply a function named _iargc_.
> 

  I had read on the net what I said, but was not sure it was correct.
  Thanks for the explanation,

   Ray



More information about the Fortran mailing list