This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25908] Multiple definitions of symbol vtables
- From: "schnetter at aei dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jan 2006 19:45:50 -0000
- Subject: [Bug c++/25908] Multiple definitions of symbol vtables
- References: <bug-25908-7427@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from schnetter at aei dot mpg dot de 2006-01-23 19:45 -------
Here is a way to reproduce the error with very little source code, but still
depending on the LAM MPI library. The actual source code I used consists of
two files, main.cc and sub.cc, which I include here for completeness:
main.cc:
#include <mpi.h>
int
main (int argc, char * argv[])
{
return 0;
}
sub.cc:
#include <mpi.h>
void
sub ()
{
}
I preprocessed these with "g++ -E", and I attach the results. When I compile
the preprocessed sources, I get:
$ ~/gcc-new/bin/g++ -o lamtest main.ii sub.ii
/usr/bin/ld: multiple definitions of symbol typeinfo for MPI::Op
/var/tmp//ccFSbBVd.o definition of typeinfo for MPI::Opin section
(__DATA,__const)
/var/tmp//cc8Rm38U.o definition of typeinfo for MPI::Opin section
(__DATA,__const)
/usr/bin/ld: multiple definitions of symbol typeinfo for PMPI::Op
/var/tmp//ccFSbBVd.o definition of typeinfo for PMPI::Opin section
(__DATA,__const)
/var/tmp//cc8Rm38U.o definition of typeinfo for PMPI::Opin section
(__DATA,__const)
/usr/bin/ld: multiple definitions of symbol typeinfo for PMPI::Comm
/var/tmp//ccFSbBVd.o definition of typeinfo for PMPI::Commin section
(__DATA,__const)
/var/tmp//cc8Rm38U.o definition of typeinfo for PMPI::Commin section
(__DATA,__const)
(and many more warnings like that).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25908