home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / fortran / 4301 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.9 KB

  1. Xref: sparky comp.lang.fortran:4301 comp.os.msdos.programmer:10550
  2. Newsgroups: comp.lang.fortran,comp.os.msdos.programmer
  3. Path: sparky!uunet!ukma!wupost!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!vet.vet.purdue.edu!kelley
  4. From: kelley@vet.vet.purdue.edu (Stephen Kelley)
  5. Subject: Re: Mixed Language MS C calls MS FORTRAN 5.1 (DOS) (help!)
  6. Message-ID: <BxM3s3.8qs@mentor.cc.purdue.edu>
  7. Sender: news@mentor.cc.purdue.edu (USENET News)
  8. Organization: Purdue University SVM
  9. References: <BxJIvH.2J9@news.cso.uiuc.edu>
  10. Date: Thu, 12 Nov 1992 16:43:14 GMT
  11. Lines: 36
  12.  
  13. In article <BxJIvH.2J9@news.cso.uiuc.edu> btbg1194@uxa.cso.uiuc.edu (Bradley T Banko) writes:
  14. - I am having some problems trying to do some mixed language programming
  15. - using MS C (5.0) to call MS FORTRAN (5.1) functions.  I think that I have
  16.  
  17. - I wrote a second program to test the Fortran subroutines, and I get a 
  18. - bunch of *link* time errors:
  19. -     L2025 symbol defined more than once
  20.  
  21. Try using the /NOD (no default library) linker switch, and explicitly
  22. listing the fortran and C libraries.  This is what I do and it usually
  23. works.  (I don't do it often enough, though, so I end up trying all
  24. the permutations of my own library, and the two language libraries.)
  25.  
  26. The order of library searching is important.
  27.  
  28. You'll end up with a link command that looks something like this :
  29.  
  30.     LINK /NOD /NOE cmain.obj forsubs.obj,,,llibce llibfore;
  31.  
  32. (This is off the top of my head, you'll need to make sure you use the
  33. correct names for the libraries you want, and try the libraries in 
  34. different orders.)
  35.  
  36. The main key to your problem, though, is that you are using two default
  37. libraries that redefine system calls.  When you use the /NOD, that problem
  38. goes away.
  39.  
  40.  
  41. Steve Kelley            kelley@flowcyt.cyto.purdue.edu
  42.  
  43. Purdue University Cytometry Laboratories        (317) 494-8638  -- voice
  44. B050 Hansen LSRB, Purdue University             (317) 494-0517  -- fax
  45. West Lafayette, Indiana, 47907
  46.