home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!cithe502.cithep.caltech.edu!walter
- From: walter@cithe501.cithep.caltech.edu (Chris Walter)
- Newsgroups: gnu.g++.help
- Subject: Has anyone made cfortran.h work with gcc?
- Date: 14 Dec 1992 23:17:18 GMT
- Organization: California Institute of Technology, Pasadena
- Lines: 25
- Distribution: gnu
- Message-ID: <1gj4luINNp7g@gap.caltech.edu>
- NNTP-Posting-Host: cithe502.cithep.caltech.edu
- Originator: walter@cithe502.cithep.caltech.edu
-
- Hello all,
-
- I am a new user to C++ and am using gcc on a IBM RS6000 running AIX 3.2.
- (gcc 2.3.2/ g++ 2.3)
-
- I would like to call Fortran routines from within my C++ programs.
- Has anyone managed to modify cfortran.h(a header file which allows
- one to easily call fortran routines within C) to work with gcc? I
- contacted the author and he isn't aware of anyone who has done it. I
- thought this might work:
-
- extern "C" {
- #include "/users/walter/cfortran/cfortran.h"
- #define RANNOR(A,B) CCALLSFSUB2(RANNOR,rannor,FLOAT,FLOAT,A,B)
- }
-
- but no luck. The linker complains it can't find
-
- rannor__Fp(some other stuff)
-
- so clearly the compiler doesn't know rannor is foreign....
-
- -Chris Walter
- walter@cithe501.cithep.caltech.edu
-
-