This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

multiple definition problem on linking


I'm not sure what I did to cause the following, since the multiple
definition error does not appear to be on a symbol that I defined myself
anywhere.  It's fine if I just compile and link DBSubscriberRec, but as soon
as I try to link DBSubscriber with it, I get this link error.   Also, this
builds fine on Solaris with a different compiler.  This build attempt is on
a Sun running Red Hat Linux 6.2.


>$ gmake
g++ -O -g  -w -Wpointer-arith -Wno-uninitialized -D_POSIX_THREADS
-D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS
-DACE_HAS_EXCEPTIONS -fPIC     -I/vob/itex_tools/MAP/common/incl
-I/vob/mirs_common/include -I/vob/ccp/hdr -c DBSubscriber.C

g++ -O -g  -w -Wpointer-arith -Wno-uninitialized -D_POSIX_THREADS
-D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS
-DACE_HAS_EXCEPTIONS -fPIC     -I/vob/itex_tools/MAP/common/incl
-I/vob/mirs_common/include -I/vob/ccp/hdr -c DBSubscriberRec.C

Linking ../../lib/libMAP_DB.so ...
g++  -w -Wpointer-arith -Wno-uninitialized -D_POSIX_THREADS
-D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -DACE_HAS_AIO_CALLS
-DACE_HAS_EXCEPTIONS -fPIC     -I/vob/itex_tools/MAP/common/incl
-I/vob/mirs_common/include -I/vob/ccp/hdr -shared -o ../../lib/libMAP_DB.so
DBSubscriber.o DBSubscriberRec.o 
DBSubscriberRec.o: In function `pair<basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > const,
basic_string<char, string_char_traits<char>, __default_alloc_template<true,
0> > >::~pair(void)':
/usr/include/g++-2/stl_tree.h(.bss+0x0): multiple definition of
`g_physicalLinkFlag'
DBSubscriber.o(.bss+0x0):/view/fkr015_linuxsim/vob/itex_tools/MAP/common/src
/MAP_DB/DBSubscriber.C: first defined here
collect2: ld returned 1 exit status
gmake: *** [../../lib/libMAP_DB.so] Error 1

>$ g++ -v
Reading specs from /usr/lib/gcc-lib/sparc-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)


Thank-you for any assistance you can provide.


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