← Back to team overview

dolfin team mailing list archive

Re: issues (?) with 0.6.3

 


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
>>>>>
>>>
>>





Follow ups

References