<font size="2"><font face="verdana,sans-serif">No, the error remains. By the way, declaration "class ITKCommon_EXPORT TriangleCellTopology" is on line 36 in the source code I am looking at.<br></font></font><br><div class="gmail_quote">
2011/11/15 Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Dženan,<br>
<br>
Does it work if you re-add the virtual keyword, then change<br>
'ITK_EXPORT' on line 45 to 'ITKCommon_EXPORT'?<br>
<br>
Thanks,<br>
Matt<br>
<br>
2011/11/15 Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>>:<br>
<div><div></div><div class="h5">> It compiles correctly in release mode when I remove the "virtual" keyword.<br>
> However with this change there is an error in debug and relwithdebinfo<br>
> modes:<br>
><br>
> error LNK2019: unresolved external symbol "public: __cdecl<br>
> itk::TriangleCellTopology::~TriangleCellTopology(void)"<br>
> (??1TriangleCellTopology@itk@@QEAA@XZ) referenced in function "int `public:<br>
> __cdecl itk::TriangleCell<class itk::CellInterface<float,class<br>
> itk::CellTraitsInfo<3,float,float,unsigned __int64,unsigned __int64,unsigned<br>
> __int64,class itk::Point<float,3>,class itk::VectorContainer<unsigned<br>
> __int64,class itk::Point<float,3> >,class std::set<unsigned __int64,struct<br>
> std::less<unsigned __int64>,class std::allocator<unsigned __int64> > > ><br>
>>::TriangleCell<class itk::CellInterface<float,class<br>
> itk::CellTraitsInfo<3,float,float,unsigned __int64,unsigned __int64,unsigned<br>
> __int64,class itk::Point<float,3>,class itk::VectorContainer<unsigned<br>
> __int64,class itk::Point<float,3> >,class std::set<unsigned __int64,struct<br>
> std::less<unsigned __int64>,class std::allocator<unsigned __int64> > > ><br>
>>(void)'::`1'::dtor$1"<br>
> (?dtor$1@?0???0?$TriangleCell@V?$CellInterface@MV?$CellTraitsInfo@$02MM_K_K_KV?$Point@M$02@itk@@V?$VectorContainer@_KV?$Point@M$02@itk@@@2@V?$set@_KU?$less@_K@std@@V?$allocator@_K@2@@std@@@itk@@@itk@@@itk@@QEAA@XZ@4HA)<br>
><br>
> On Tue, Nov 15, 2011 at 15:00, Arnaud Gelas <<a href="mailto:arnaud_gelas@hms.harvard.edu">arnaud_gelas@hms.harvard.edu</a>><br>
> wrote:<br>
>><br>
>> I guess the problem has been introduced<br>
>> in d7b64276cd2f15d336c50df76b275e7a67b80c57, the destructor became virtual<br>
>> (?). Apart from that I don't see any recent changes on these files...<br>
>> Can you try removing the virtual keyword ?<br>
>> On Nov 15, 2011, at 8:44 AM, Arnaud Gelas wrote:<br>
>><br>
>> My bad, it was already implemented in the corresponding cxx file :-/ ...<br>
>> Which version of Microsoft Visual is it?<br>
>><br>
>> On Nov 15, 2011, at 8:24 AM, Dženan Zukić wrote:<br>
>><br>
>> I tried. It gives a different error then:<br>
>><br>
>> 2>ITKCommon-4.0.lib(itkTriangleCellTopology.obj) : error LNK2005: "public:<br>
>> __cdecl itk::TriangleCellTopology::TriangleCellTopology(void)"<br>
>> (??0TriangleCellTopology@itk@@QEAA@XZ) already defined in qeUtil.obj<br>
>> 2> Creating library D:/Repo/Spine/Release/Spine.lib and object<br>
>> D:/Repo/Spine/Release/Spine.exp<br>
>> 2>D:\Repo\Spine\Release\Spine.exe : fatal error LNK1169: one or more<br>
>> multiply defined symbols found<br>
>><br>
>> 2011/11/15 Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>><br>
>>><br>
>>> You mean in the source code of TriangleCellTopology?<br>
>>><br>
>>> 2011/11/15 Arnaud Gelas <<a href="mailto:arnaud_gelas@hms.harvard.edu">arnaud_gelas@hms.harvard.edu</a>><br>
>>>><br>
>>>> Hi Dzenan,<br>
>>>> Can you try changing as follows, please?<br>
>>>> 39 TriangleCellTopology();<br>
>>>> 40 virtual ~TriangleCellTopology();<br>
>>>> by<br>
>>>> 39 TriangleCellTopology() {}<br>
>>>> 40 virtual ~TriangleCellTopology() {}<br>
>>>> My 2 cts,<br>
>>>> Arnaud<br>
>>>> On Nov 15, 2011, at 6:45 AM, Dženan Zukić wrote:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> I updated my ITK to commit dd21441682b47f9e553259d2c2948c71c806bcdd (one<br>
>>>> revision after RC2). Now my project no longer compiles in release mode<br>
>>>> (debug and relwithdebinfo compile fine). The error is given below. The code<br>
>>>> used is:<br>
>>>><br>
>>>> #include "itkTriangleCell.h"<br>
>>>> //other includes<br>
>>>><br>
>>>> typedef MeshType::CellType CellType;<br>
>>>> typedef CellType::CellAutoPointer CellAutoPointer;<br>
>>>> typedef itk::TriangleCell< CellType > TriangleType;<br>
>>>><br>
>>>> //later I use it:<br>
>>>> CellAutoPointer tr;<br>
>>>> tr.TakeOwnership(new TriangleType);<br>
>>>><br>
>>>> Any hints about how to fix it?<br>
>>>><br>
>>>> Regards,<br>
>>>> Dženan<br>
>>>><br>
>>>> error LNK2019: unresolved external symbol "public: virtual __cdecl<br>
>>>> itk::TriangleCellTopology::~TriangleCellTopology(void)"<br>
>>>> (??1TriangleCellTopology@itk@@UEAA@XZ) referenced in function "int `public:<br>
>>>> __cdecl itk::TriangleCell<class itk::CellInterface<float,class<br>
>>>> itk::CellTraitsInfo<3,float,float,unsigned __int64,unsigned __int64,unsigned<br>
>>>> __int64,class itk::Point<float,3>,class itk::VectorContainer<unsigned<br>
>>>> __int64,class itk::Point<float,3> >,class std::set<unsigned __int64,struct<br>
>>>> std::less<unsigned __int64>,class std::allocator<unsigned __int64> > > ><br>
>>>> >::TriangleCell<class itk::CellInterface<float,class<br>
>>>> itk::CellTraitsInfo<3,float,float,unsigned __int64,unsigned __int64,unsigned<br>
>>>> __int64,class itk::Point<float,3>,class itk::VectorContainer<unsigned<br>
>>>> __int64,class itk::Point<float,3> >,class std::set<unsigned __int64,struct<br>
>>>> std::less<unsigned __int64>,class std::allocator<unsigned __int64> > > ><br>
>>>> >(void)'::`1'::dtor$1"<br>
>>>> (?dtor$1@?0???0?$TriangleCell@V?$CellInterface@MV?$CellTraitsInfo@$02MM_K_K_KV?$Point@M$02@itk@@V?$VectorContainer@_KV?$Point@M$02@itk@@@2@V?$set@_KU?$less@_K@std@@V?$allocator@_K@2@@std@@@itk@@@itk@@@itk@@QEAA@XZ@4HA)<br>
>>>><br>
>>>><br>
>>>> <ATT00001.txt><br>
>>><br>
>><br>
>><br>
>> <ATT00001.txt><br>
><br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</blockquote></div><br>