<font size="2"><font face="verdana,sans-serif">Have you tested this example? What are the findings?<br></font></font><br><div class="gmail_quote">2011/11/15 Dženan Zukić <span dir="ltr">&lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font size="2"><font face="verdana,sans-serif">Checking whether it works with that revision will take some time, so I cannot do it today. I can do it tomorrow if the below info doesn&#39;t get it resolved.<br>

<br>Here is the mwe. Error in Release, not in Debug or RelWithDebInfo:<br>
<br><span style="font-family:courier new,monospace">#include &quot;itkTriangleCell.h&quot;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">#include &quot;itkMesh.h&quot;</span><br style="font-family:courier new,monospace">


<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">typedef itk::Mesh&lt;float,3&gt; MeshType;</span><div class="im"><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">typedef MeshType::CellType CellType;</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">typedef CellType::CellAutoPointer CellAutoPointer;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">typedef itk::TriangleCell&lt; CellType &gt; TriangleType;</span><br style="font-family:courier new,monospace">


<br style="font-family:courier new,monospace"></div><span style="font-family:courier new,monospace">void main()</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">{</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">    CellAutoPointer tr;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">    tr.TakeOwnership(new TriangleType);</span><br style="font-family:courier new,monospace">


<span style="font-family:courier new,monospace">    //or just this: TriangleType *tt=new TriangleType;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">}</span><br>
</font></font><div><div></div><div class="h5"><br><div class="gmail_quote">2011/11/15 Arnaud Gelas <span dir="ltr">&lt;<a href="mailto:arnaud_gelas@hms.harvard.edu" target="_blank">arnaud_gelas@hms.harvard.edu</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Dženan,<br>
    <br>
    Can you post a complete and minimal main where we could reproduce
    the error, please?<br>
    <br>
    Can you also try <br>
    <br>
        $ git revert d7b64276cd2f15d336c50df76b275e7a67b80c57<br>
    <br>
    please?<br>
    <br>
    thanks,<br><font color="#888888">
    Arnaud</font><div><div></div><div><br>
    <br>
    On 11/15/2011 10:12 AM, Dženan Zukić wrote:
    <blockquote type="cite"><font size="2"><font face="verdana,sans-serif">No, the
          error remains. By the way, declaration &quot;class ITKCommon_EXPORT
          TriangleCellTopology&quot; 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">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</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>
          &#39;ITK_EXPORT&#39; on line 45 to &#39;ITKCommon_EXPORT&#39;?<br>
          <br>
          Thanks,<br>
          Matt<br>
          <br>
          2011/11/15 Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>&gt;:<br>
          <div>
            <div>&gt; It compiles correctly in release mode
              when I remove the &quot;virtual&quot; keyword.<br>
              &gt; However with this change there is an error in debug
              and relwithdebinfo<br>
              &gt; modes:<br>
              &gt;<br>
              &gt; error LNK2019: unresolved external symbol &quot;public:
              __cdecl<br>
              &gt;
              itk::TriangleCellTopology::~TriangleCellTopology(void)&quot;<br>
              &gt; (??1TriangleCellTopology@itk@@QEAA@XZ) referenced in
              function &quot;int `public:<br>
              &gt; __cdecl itk::TriangleCell&lt;class
              itk::CellInterface&lt;float,class<br>
              &gt; itk::CellTraitsInfo&lt;3,float,float,unsigned
              __int64,unsigned __int64,unsigned<br>
              &gt; __int64,class itk::Point&lt;float,3&gt;,class
              itk::VectorContainer&lt;unsigned<br>
              &gt; __int64,class itk::Point&lt;float,3&gt; &gt;,class
              std::set&lt;unsigned __int64,struct<br>
              &gt; std::less&lt;unsigned __int64&gt;,class
              std::allocator&lt;unsigned __int64&gt; &gt; &gt; &gt;<br>
              &gt;&gt;::TriangleCell&lt;class
              itk::CellInterface&lt;float,class<br>
              &gt; itk::CellTraitsInfo&lt;3,float,float,unsigned
              __int64,unsigned __int64,unsigned<br>
              &gt; __int64,class itk::Point&lt;float,3&gt;,class
              itk::VectorContainer&lt;unsigned<br>
              &gt; __int64,class itk::Point&lt;float,3&gt; &gt;,class
              std::set&lt;unsigned __int64,struct<br>
              &gt; std::less&lt;unsigned __int64&gt;,class
              std::allocator&lt;unsigned __int64&gt; &gt; &gt; &gt;<br>
              &gt;&gt;(void)&#39;::`1&#39;::dtor$1&quot;<br>
              &gt;
(?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>



              &gt;<br>
              &gt; On Tue, Nov 15, 2011 at 15:00, Arnaud Gelas &lt;<a href="mailto:arnaud_gelas@hms.harvard.edu" target="_blank">arnaud_gelas@hms.harvard.edu</a>&gt;<br>
              &gt; wrote:<br>
              &gt;&gt;<br>
              &gt;&gt; I guess the problem has been introduced<br>
              &gt;&gt; in d7b64276cd2f15d336c50df76b275e7a67b80c57, the
              destructor became virtual<br>
              &gt;&gt; (?). Apart from that I don&#39;t see any recent
              changes on these files...<br>
              &gt;&gt; Can you try removing the virtual keyword ?<br>
              &gt;&gt; On Nov 15, 2011, at 8:44 AM, Arnaud Gelas wrote:<br>
              &gt;&gt;<br>
              &gt;&gt; My bad, it was already implemented in the
              corresponding cxx file :-/ ...<br>
              &gt;&gt; Which version of Microsoft Visual is it?<br>
              &gt;&gt;<br>
              &gt;&gt; On Nov 15, 2011, at 8:24 AM, Dženan Zukić wrote:<br>
              &gt;&gt;<br>
              &gt;&gt; I tried. It gives a different error then:<br>
              &gt;&gt;<br>
              &gt;&gt;
              2&gt;ITKCommon-4.0.lib(itkTriangleCellTopology.obj) :
              error LNK2005: &quot;public:<br>
              &gt;&gt; __cdecl
              itk::TriangleCellTopology::TriangleCellTopology(void)&quot;<br>
              &gt;&gt; (??0TriangleCellTopology@itk@@QEAA@XZ) already
              defined in qeUtil.obj<br>
              &gt;&gt; 2&gt;     Creating library
              D:/Repo/Spine/Release/Spine.lib and object<br>
              &gt;&gt; D:/Repo/Spine/Release/Spine.exp<br>
              &gt;&gt; 2&gt;D:\Repo\Spine\Release\Spine.exe : fatal
              error LNK1169: one or more<br>
              &gt;&gt; multiply defined symbols found<br>
              &gt;&gt;<br>
              &gt;&gt; 2011/11/15 Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>&gt;<br>
              &gt;&gt;&gt;<br>
              &gt;&gt;&gt; You mean in the source code of
              TriangleCellTopology?<br>
              &gt;&gt;&gt;<br>
              &gt;&gt;&gt; 2011/11/15 Arnaud Gelas &lt;<a href="mailto:arnaud_gelas@hms.harvard.edu" target="_blank">arnaud_gelas@hms.harvard.edu</a>&gt;<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; Hi Dzenan,<br>
              &gt;&gt;&gt;&gt; Can you try changing as follows, please?<br>
              &gt;&gt;&gt;&gt;  39   TriangleCellTopology();<br>
              &gt;&gt;&gt;&gt;  40   virtual ~TriangleCellTopology();<br>
              &gt;&gt;&gt;&gt; by<br>
              &gt;&gt;&gt;&gt;  39   TriangleCellTopology() {}<br>
              &gt;&gt;&gt;&gt;  40   virtual ~TriangleCellTopology() {}<br>
              &gt;&gt;&gt;&gt; My 2 cts,<br>
              &gt;&gt;&gt;&gt; Arnaud<br>
              &gt;&gt;&gt;&gt; On Nov 15, 2011, at 6:45 AM, Dženan Zukić
              wrote:<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; Hi all,<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; I updated my ITK to commit
              dd21441682b47f9e553259d2c2948c71c806bcdd (one<br>
              &gt;&gt;&gt;&gt; revision after RC2). Now my project no
              longer compiles in release mode<br>
              &gt;&gt;&gt;&gt; (debug and relwithdebinfo compile fine).
              The error is given below. The code<br>
              &gt;&gt;&gt;&gt; used is:<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; #include &quot;itkTriangleCell.h&quot;<br>
              &gt;&gt;&gt;&gt; //other includes<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; typedef MeshType::CellType CellType;<br>
              &gt;&gt;&gt;&gt; typedef CellType::CellAutoPointer
              CellAutoPointer;<br>
              &gt;&gt;&gt;&gt; typedef itk::TriangleCell&lt; CellType
              &gt; TriangleType;<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; //later I use it:<br>
              &gt;&gt;&gt;&gt; CellAutoPointer tr;<br>
              &gt;&gt;&gt;&gt; tr.TakeOwnership(new TriangleType);<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; Any hints about how to fix it?<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; Regards,<br>
              &gt;&gt;&gt;&gt; Dženan<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; error LNK2019: unresolved external symbol
              &quot;public: virtual __cdecl<br>
              &gt;&gt;&gt;&gt;
              itk::TriangleCellTopology::~TriangleCellTopology(void)&quot;<br>
              &gt;&gt;&gt;&gt; (??1TriangleCellTopology@itk@@UEAA@XZ)
              referenced in function &quot;int `public:<br>
              &gt;&gt;&gt;&gt; __cdecl itk::TriangleCell&lt;class
              itk::CellInterface&lt;float,class<br>
              &gt;&gt;&gt;&gt;
              itk::CellTraitsInfo&lt;3,float,float,unsigned
              __int64,unsigned __int64,unsigned<br>
              &gt;&gt;&gt;&gt; __int64,class
              itk::Point&lt;float,3&gt;,class
              itk::VectorContainer&lt;unsigned<br>
              &gt;&gt;&gt;&gt; __int64,class itk::Point&lt;float,3&gt;
              &gt;,class std::set&lt;unsigned __int64,struct<br>
              &gt;&gt;&gt;&gt; std::less&lt;unsigned __int64&gt;,class
              std::allocator&lt;unsigned __int64&gt; &gt; &gt; &gt;<br>
              &gt;&gt;&gt;&gt; &gt;::TriangleCell&lt;class
              itk::CellInterface&lt;float,class<br>
              &gt;&gt;&gt;&gt;
              itk::CellTraitsInfo&lt;3,float,float,unsigned
              __int64,unsigned __int64,unsigned<br>
              &gt;&gt;&gt;&gt; __int64,class
              itk::Point&lt;float,3&gt;,class
              itk::VectorContainer&lt;unsigned<br>
              &gt;&gt;&gt;&gt; __int64,class itk::Point&lt;float,3&gt;
              &gt;,class std::set&lt;unsigned __int64,struct<br>
              &gt;&gt;&gt;&gt; std::less&lt;unsigned __int64&gt;,class
              std::allocator&lt;unsigned __int64&gt; &gt; &gt; &gt;<br>
              &gt;&gt;&gt;&gt; &gt;(void)&#39;::`1&#39;::dtor$1&quot;<br>
              &gt;&gt;&gt;&gt;
(?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>



              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt;<br>
              &gt;&gt;&gt;&gt; &lt;ATT00001.txt&gt;<br>
              &gt;&gt;&gt;<br>
              &gt;&gt;<br>
              &gt;&gt;<br>
              &gt;&gt; &lt;ATT00001.txt&gt;<br>
              &gt;<br>
              &gt;<br>
            </div>
          </div>
          &gt; _____________________________________<br>
          &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
          &gt;<br>
          &gt; Visit other Kitware open-source projects at<br>
          &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
          &gt;<br>
          &gt; Kitware offers ITK Training Courses, for more information
          visit:<br>
          &gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
          &gt;<br>
          &gt; Please keep messages on-topic and check the ITK FAQ at:<br>
          &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
          &gt;<br>
          &gt; Follow this link to subscribe/unsubscribe:<br>
          &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
          &gt;<br>
          &gt;<br>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br>
</div></div></blockquote></div><br>