This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Link issue and other issues...
- From: David Highley <dhighley at highley-recommended dot com>
- To: fortran at gcc dot gnu dot org
- Date: Sat, 23 Feb 2008 10:47:29 -0800 (PST)
- Subject: Re: Link issue and other issues...
"Jerry DeLisle wrote:"
>
> David Highley wrote:
> > Trying to use the g77 3.3.3 compiler in a Cygwin environment to build
> > some old Fortran code. Have a few issues. The biggest being entry point
> > names and where the underscore characters are added.
> >
> > I have tried all combinations of -fno-underscoring and
> > -fleading-underscore to try and get the underscore moved to the front of
> > the name instead of being appended to the name. Need to build code that
> > will link using Windows compilers with C++ code.
> >
> > Other issue was the keyword static which does not seem to be known by
> > the compiler. I'm using the following options:
> > -fvxt -ffixed-lin-length-none -fno-underscoring -fleading-underscore
> > -mno-cygwin
> >
> > Last thing I ran into was the need to change:
> > IF(VARIAB) to IF(VARIAB .NE. 0)
> >
> > Thanks
> >
> Have you tried gfortran? g77 is not really supported any more.
I see no package for gfortran in the latest Cygwin updates.
> Also, can you submit a small example of code illustrating what you are trying to
> do? That way we have half a chance to help you. (Which we do want to do)
Its not that complicated.
SUBROUTINE XYZ
Windows compiled C++ code generates a reference for:
_XYZ
Run nm -C on the Fortran library and you see:
T XYZ__
They will never link. Add option -fno-underscoring and nm -C now shows:
T XYZ
Add option -fleading-underscore and nm -C shows:
T XYZ
I would say the option for leading-underscore is not functioning or the
no-underscoring is preventing the other option. Given that I tried the
-fleading-underscore by its self I would say that it does not work.
> Jerry
>
--
Regards,
David Highley
Highley Recommended, Inc. Phone: (206) 669-0081
2927 SW 339th Street WEB: http://www.highley-recommended.com
Federal Way, WA 98023-7732