dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #03676
Re: issues (?) with 0.6.3
I think I found the problem. Look in your file Class2.cpp:
#include "Class1.hpp"
using namespace dolfin;
Class1::Class1()
{}
Notice something wrong? :-)
/Anders
On Mon, Oct 30, 2006 at 10:44:09AM +0100, Garth N. Wells wrote:
>
>
> Dag Lindbo wrote:
> >>
>
> ...
>
> >>> I'm no C++ boffin, but it seems to me the the linker (g++) is getting
> >>> confused over the fact there is code in the form headers that has been
> >>> compiled multiple times (once for each class that uses the particular
> >>> form) . Did libtool do a better job at figuring this out? How do I use
> >>> libtool?
> >>>
> >> Can you give a stripped down example where it goes wrong?
> >
> > The attached files are _very_ simple. Just two classes (that do nothing)
> > and a main (that does nothing). /Dag
> >
>
> The problem seems to stem from LSM_grad.h containing definitions
> and not just declarations. The definitions are compiled each time they
> appear. I'm not sure how to get around it. Note that if you put the
> definitions for Class1 and Class2 into the header files and remove
> Class1.cpp and Class2.cpp, everything works.
>
> Garth
>
>
> >> Garth
> >>
> >>> /Dag
> >>>
> >>>> Garth
> >>>>
> >>>>> Thanks a lot!
> >>>>> Dag Lindbo
> >>>>>
> >>>>> _______________________________________________
> >>>>> DOLFIN-dev mailing list
> >>>>> DOLFIN-dev@xxxxxxxxxx
> >>>>> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>>>>
> >>>
> >>
>
>
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
Follow ups
References