I have been getting a similar error: ============================ Remaking Makefile.dep ==============debug========= forward.cc ============================ Linking forward /deal.II/6.3.1/lib/libbase.g.a(timer.g.o): In function `dealii::Timer::get_data() const': /usr/include/c++/4.2/exception:59: multiple definition of `dealii::Timer::get_data() const' forward.g.o:/deal.II/6.3.1/base/include/base/timer.h:566: first defined here collect2: ld returned 1 exit status make: *** [forward] Error 1
$ for i in *.o ; do nm $i | grep Timer | grep data ; done 0000000000000000 T _ZNK6dealii5Timer8get_dataEv I'm using mpicxx. Jennifer On Wed, 29 Sep 2010 22:40:55 -0500, Wolfgang Bangerth <[email protected]> wrote: >> I noticed that get_data() is defined in the header file (timer.h) and I >> believe it is therefore being included in multiple compilation units (one >> for each NewtonKrylov subclass), triggering the above multiple definition >> error. > > But it's inline in my copy of the library, which should prevent the error. > Is > it not in your case? > > But the error message appears to be subtler than that because it > references > the same symbol name twice (once as "in function XXX" and then the name of > the > duplicated symbol, which has the same name). Can you do the following: > for i in *.o ; do nm $i | grep Timer | grep data ; done > and send the output. > > Also, what's the compiler you use? > > W. > > ------------------------------------------------------------------------- > Wolfgang Bangerth email: [email protected] > www: http://www.math.tamu.edu/~bangerth/ > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
