This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Why should I get redefined symbols during linking?...





I compiled several source files with gcc for powerpc_eabi. I generated a library
and then unsuccessfully linked  the library with another project.
The linker returned lots of warning reporting redefinition of symbols.
All those redefined symbols were tied to the source files I compiled to create
the library.
So I looked for some redefinition in those files: using the nm command I got the
symbols of two files in which the linker returned a redefinition.
Actually I found that the redefined symbols are due to header files as
bastring.h (included from cygwin directory on my machine...).
I can't figure out why the linker can't resolve the same symbol since I compiled
different source files which included the same classes declaration.

P.S.
I first needed gcc to compile source files (the DIAB compiler doesn't support as
many advanced c++ features as gcc does), and the I generated the library under
DAR (archiver for DIAB), but DLD (linker for DIAB compiler) couldn't resolve
symbols.
Is it a limitation of this linker or something wrong with my compiling
procedure???

Thank you in advance...(inexperience)
Luca.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]