home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sun / misc / 5986 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.sys.sun.misc
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!pasteur!bellini.berkeley.edu!adams
  3. From: adams@bellini.berkeley.edu (Adam L. Schwartz)
  4. Subject: Incremental linking
  5. Message-ID: <1992Dec23.182228.24925@pasteur.Berkeley.EDU>
  6. Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
  7. Nntp-Posting-Host: bellini.berkeley.edu
  8. Organization: U.C. Berkeley -- ERL
  9. Date: Wed, 23 Dec 1992 18:22:28 GMT
  10. Lines: 30
  11.  
  12. I'm using the -A flag in the link editor (ld) and have run into an interesting
  13. problem.  The main program is a C program compiled (and linked) by cc.  Later,
  14. I attempt to link in another program which calls Fortran routines.  For some
  15. reason the linker complains that some of the function in libmath.a are
  16. multiply defined.
  17.  
  18. Here are the details:
  19. The multiplied defined functions are:
  20. _econvert
  21. _fconvert
  22. _double_to_decimal
  23. _quadruple_to_decimal
  24.  
  25. which occur in the newer math library in /usr/lang/SC1.0/cgxx/libm.a but not in
  26. /usr/lib/libm.a
  27.  
  28. These functions are also defined in libc.a.
  29.  
  30. 1) These functions have already been linked into the main program.
  31. 2) I think libF77.a makes calls which required these functions.
  32. 3) Since the order of -lm and -lc is the same for both linkings, even if the 
  33. definitions were different in the two libraries, the linker should be looking
  34. in -lm for the definitions both times (so there shouldn't be multiple 
  35. definitions).
  36.  
  37. If you have any helpful comments please let me know.  I will gladly supply any
  38. additional information about this problem if needed.
  39.  
  40. Thanks in advance,
  41. Adam
  42.