home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.misc
- 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
- From: adams@bellini.berkeley.edu (Adam L. Schwartz)
- Subject: Incremental linking
- Message-ID: <1992Dec23.182228.24925@pasteur.Berkeley.EDU>
- Sender: nntp@pasteur.Berkeley.EDU (NNTP Poster)
- Nntp-Posting-Host: bellini.berkeley.edu
- Organization: U.C. Berkeley -- ERL
- Date: Wed, 23 Dec 1992 18:22:28 GMT
- Lines: 30
-
- I'm using the -A flag in the link editor (ld) and have run into an interesting
- problem. The main program is a C program compiled (and linked) by cc. Later,
- I attempt to link in another program which calls Fortran routines. For some
- reason the linker complains that some of the function in libmath.a are
- multiply defined.
-
- Here are the details:
- The multiplied defined functions are:
- _econvert
- _fconvert
- _double_to_decimal
- _quadruple_to_decimal
-
- which occur in the newer math library in /usr/lang/SC1.0/cgxx/libm.a but not in
- /usr/lib/libm.a
-
- These functions are also defined in libc.a.
-
- 1) These functions have already been linked into the main program.
- 2) I think libF77.a makes calls which required these functions.
- 3) Since the order of -lm and -lc is the same for both linkings, even if the
- definitions were different in the two libraries, the linker should be looking
- in -lm for the definitions both times (so there shouldn't be multiple
- definitions).
-
- If you have any helpful comments please let me know. I will gladly supply any
- additional information about this problem if needed.
-
- Thanks in advance,
- Adam
-