This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems linking FORTRAN to C++
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Gustavo Bevilacqua Leal <gustavob at cetuc dot puc-rio dot br>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 09 Jul 2003 23:22:26 +0200
- Subject: Re: Problems linking FORTRAN to C++
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <5.1.0.14.0.20030707154016.00b2d908@mamona.cetuc.puc-rio.br>
Gustavo Bevilacqua Leal wrote:
I am having to link a FORTRAN source code with C++. I did
everything recommend at the manual but nothing worked. For example
as I included the file g2c.h the compiler said there is no type
__g77_integer,
which is true. I tried to use the cfortran wrapper (see
http://www-zeus.desy.de/~burow/cfortran/), but the linker, gcc, couldn´t
link the
C/FORTRAN code with the FORTRAN builtins, which are defined in the
library libg2c.a.
I am using the cygwin enviroment, the version of the compiler is 3.2
20020927.
What do I have to do, in order to link both codes?
This was an error in the compiler introduced in version 3.1 that went
unnoticed until 3.2 was out. It is fixed in version 3.3.
Hope this helps,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)