: ld error: _tolower & _toupper multiply defined

: ld error: _tolower & _toupper multiply defined

Post by Fred L Drake » Thu, 23 Dec 1993 03:55:51



  Lately I've encountered a problem with linking C programs from various
sources.  The one error I get is that a symbol is multiply defined, and the
only symbols I get the error for are _tolower & _toupper.  I have checked
the makefiles for the offending projects, and have not been able to locate
requests to link with libc.a, nor are tolower() and toupper() being
defined in the source for the project.  Specific packages I've encountered
this with include (but are not limited to) Regina (REXX interpreter), xgks,
and XVhelp.  Has anyone else had problems similar to this?  I would appreciate
hearing from you if so.  (Please e-mail; I will summarize if anyone asks me
to.)

  System:  kernel 0.99.13, gcc 2.4.5, lib[cm] 4.4.4.

  Thanks in advance!
  -Fred

 
 
 

1. ld: fatal error : symbols multiply-defined

Hello,

I am using ld's -r option to build combine several object files into a
single relocatable object file. This works fine but when I then
include this new relocatable object file into another ld command to
create an executable I get the following errors:

ra: /export/home/greg/code/prog >cc -dn -o invoker invoker.c testies.o
ld: fatal: symbol `_start' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_environ' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_init' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crti.o and file testies.o);
ld: fatal: symbol `___Argv' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `__cg92_used' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_lib_version' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/values-xa.o and file testies.o);
ld: fatal: symbol `__environ_lock' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crt1.o and file testies.o);
ld: fatal: symbol `_fini' is multiply-defined:
(file /opt/SUNWspro/WS6U2/lib/crti.o and file testies.o);
ld: fatal: File processing errors. No output written to invoker

I am running Solaris8.

Any ideas on how to fix this?

It appears the objects crt1.o, crti.o and values-xa.o are being
linked-in twice...each time ld is invoked. Is there any way to stop
this?

Thanks,
Greg

2. WANTED: Program for printing Directory Structures

3. ld multiply defined error

4. IBM Scrollpoint mouse?

5. Problem: ld (linker) giving multiply defined symbol fatal errors

6. Can't open include file 'sys/select.h'.

7. ld: fatal: symbol `_init' is multiply defined???

8. Solaris 2.5.1 - Complex pipeline results in timing error! Very weird! 100% replicable.

9. ld: multiply defined symbol

10. solaris,apache,mod_perl,php: Make bombs symbol `Error' is multiply defined

11. gcc giving error _main (multiply defined) /usr/lib/crt0.o

12. Multiply defined, when to write programm's on PRO*C

13. How do I check a .a file for multiply defined symbols?