home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / g / help / 1587 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.2 KB  |  38 lines

  1. Path: sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!cithe502.cithep.caltech.edu!walter
  2. From: walter@cithe501.cithep.caltech.edu (Chris Walter)
  3. Newsgroups: gnu.g++.help
  4. Subject: Has anyone made cfortran.h work with gcc?
  5. Date: 14 Dec 1992 23:17:18 GMT
  6. Organization: California Institute of Technology, Pasadena
  7. Lines: 25
  8. Distribution: gnu
  9. Message-ID: <1gj4luINNp7g@gap.caltech.edu>
  10. NNTP-Posting-Host: cithe502.cithep.caltech.edu
  11. Originator: walter@cithe502.cithep.caltech.edu
  12.  
  13. Hello all,
  14.  
  15. I am a new user to C++ and am using gcc on a IBM RS6000 running AIX 3.2.
  16. (gcc 2.3.2/ g++ 2.3)
  17.  
  18. I would like to call Fortran routines from within my C++ programs.
  19. Has anyone managed to modify cfortran.h(a header file which allows
  20. one to easily call fortran routines within C) to work with gcc?  I
  21. contacted the author and he isn't aware of anyone who has done it.  I
  22. thought this might work:
  23.  
  24. extern "C" {
  25. #include "/users/walter/cfortran/cfortran.h"
  26. #define RANNOR(A,B) CCALLSFSUB2(RANNOR,rannor,FLOAT,FLOAT,A,B)
  27. }
  28.  
  29. but no luck. The linker complains it can't find 
  30.  
  31. rannor__Fp(some other stuff)
  32.  
  33. so clearly the compiler doesn't know rannor is foreign....
  34.  
  35. -Chris Walter
  36. walter@cithe501.cithep.caltech.edu
  37.  
  38.