Thank you for answer. I used both siesta-2.0.1 and siesta-2.0.2 and denchar does not compile with gfortran on both.
This is how I solved the problem: edit file f2kcli.f90 : replace #ifndef GFORTRAN with #ifdef __GFORTRAN__ Regards Ruslan Zhachuk 2009/7/28 Lifeng Sun <lifong...@gmail.com> > Hi, > > The URL you referenced is for SIESTA _2.0.2_, but your working path > suggests you are compiling SIESTA _2.0.1_, which has not been updated > to support gfortran. Here follows a patch for f2kcli.F90 from the > official releases: > > diff --git a/Src/f2kcli.F90 b/Src/f2kcli.F90 > index 826d9de..f415b08 100644 > --- a/Src/f2kcli.F90 > +++ b/Src/f2kcli.F90 > @@ -17,6 +17,8 @@ > ! Date : February 2001 > ! > MODULE F2KCLI > +#ifndef GFORTRAN > + > #ifdef __NAG__ > use f90_unix > #else > @@ -220,7 +222,6 @@ > RETURN > END SUBROUTINE GET_COMMAND_ARGUMENT > ! > +#endif > END MODULE F2KCLI > > > > Regards, > Lifeng Sun > > On Tue, 28 Jul 2009, ?????? ????? wrote: > >Dear Siesta users, > > > >in page http://fisica.ehu.es/ag/siesta-extra/release.notes_2.0.2 > > > >there is stntence <To support gfortran, the f2kcli.F90 program has been > >updated.> > > > >But when somebody try to compile denchar with gfortran > >immediatly receives an error > > > >/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:212: undefined reference to > `getarg_' > >f2kcli.o: In function `__f2kcli__command_argument_count': > >/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:122: undefined reference to > `iargc_' > >collect2: ld returned 1 exit status > >make: *** [denchar] Error 1 > >zhac...@solaris:~/siesta-2.0.1/Src> > > > > > -- > Lifeng Sun > Center of Mathematics and Theoretical Physics > Shanghai Institute for Advanced Studies > University of Science and Technology of China >