This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
multiply defined symbols (C++ standard exceptions) on Solaris w/1.0.3
- To: egcs at cygnus dot com
- Subject: multiply defined symbols (C++ standard exceptions) on Solaris w/1.0.3
- From: Steinar Bang <sb at metis dot no>
- Date: 09 Jun 1998 13:59:52 +0200
Platform: SPARC Solaris 2.5, egcs 1.0.3
I get a problem when attempting to link executables or shared
libraries that use the ISO Standard C++ exceptions. The symbols seems
to be defined both in libstdc++.a and in the libgcc.a library of this
particular compiler version.
Anyone know of a cure/workaround/whatever...?
Thanx!
- Steinar
Linker error message follows:
g++ -shared -o libmmlparser.so.1.0 .obj/debug/MmlBaseP.o .obj/debug/mmlAst.o .obj/debug/mmlbase.o .obj/debug/mmlbaseLexer.o .obj/debug/mmlcallback.o .obj/debug/mmlparser.o .obj/debug/mmlreader.o .obj/debug/AParser.o .obj/debug/DLexerBase.o .obj/debug/ATokenBuffer.o .obj/debug/PCCTSAST.o .obj/debug/ASTBase.o
ld: fatal: symbol `__default_unexpected(void)' is multiply defined:
(file /opt/pub/lib/libstdc++.a(exceptioni.o) and file /giga/sb/apps/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/libgcc.a(exception.o));
ld: fatal: symbol `terminate(void)' is multiply defined:
(file /opt/pub/lib/libstdc++.a(exceptioni.o) and file /giga/sb/apps/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/libgcc.a(exception.o));
ld: fatal: symbol `set_terminate(void (*)(void))' is multiply defined:
(file /opt/pub/lib/libstdc++.a(exceptioni.o) and file /giga/sb/apps/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/libgcc.a(exception.o));
ld: fatal: symbol `set_unexpected(void (*)(void))' is multiply defined:
(file /opt/pub/lib/libstdc++.a(exceptioni.o) and file /giga/sb/apps/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/libgcc.a(exception.o));
ld: fatal: symbol `unexpected(void)' is multiply defined:
(file /opt/pub/lib/libstdc++.a(exceptioni.o) and file /giga/sb/apps/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/libgcc.a(exception.o));
ld: fatal: File processing errors. No output written to libmmlparser.so.1.0
collect2: ld returned 1 exit status
gmake[2]: *** [/giga/sb/gcc/2x/lib/libmmlparser.so.1.0] Error 1