<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hello Cagatay,</span></div><div><br><span></span></div><div><span>Thank you for your reply. <br></span></div><div><br><span></span></div><div><span>I found the problem was in the ".txx" file, one sentence was incorrectly written in the function definition. So it worked now. <br></span></div><div><br><span></span></div><div><span>Thanks again,</span></div><div><span>Abayiz</span></div><div><br></div> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight: bold;">From:</span></b> cagatay bilgin <bilgincc@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Abayiz <abayiz@yahoo.com> <br><b><span style="font-weight:
bold;">Cc:</span></b> David Doria <daviddoria@gmail.com>; itk <insight-users@itk.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 22, 2011 1:39 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] Cmake Linking Object Error: undefined reference<br> </font> <br>
<div id="yiv49744394"><div><span class="yiv49744394Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px;">Hi Abayiz, </span></div><div><span class="yiv49744394Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px;"><br>
</span></div><div><span class="yiv49744394Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px;">The difference that Bill suggested is the line:</span></div>
<span class="yiv49744394Apple-style-span" style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px;">ADD_EXECUTABLE( VavSegment VavSegment.cxx)<br></span><br>If you have the headers and includes properly setup, this <div>
is the easiest way to add an executable. Please take a <div>look here and make sure you have a similar include, </div><div>define and ifndef setup both at the header and the hxx </div><div>file as well as the templates and such before your </div>
<div>implementation in the hxx files. Without seeing your </div><div>code it is impossible to enumerate all the things that could </div><div>be going wrong. </div><div><div><br></div><div>http://www.vtk.org/Wiki/ITK/Examples/Developer/ImageSource</div>
<div><br></div><div>Let us know, </div><div>Cagatay</div><div><br><div class="yiv49744394gmail_quote">On Sun, Nov 20, 2011 at 11:47 PM, Abayiz <span dir="ltr"><<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv49744394gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>
<span>Hello David and Bill,</span></div><div><br><span></span></div><div><span>Thank you for your replies. <br></span></div><div><br><span></span></div><div><span>I tried the CMakeList that Bill said, which I think is similar to Cagatay's, and it didn't work. <br>
</span></div><div><span>And, I declared "SetThirdAdvectionFunction" in "</span>VavBoneSegmentationLevelSetImageFilter.h", while giving its implementation in the corresponding "VavBoneSegmentationLevelSetImageFilter.txx". I've done this kind of work before, and they worked quite well, but when I did it exactly the same manner again, it failed. <br>
</div><div><br></div><div>Regards,<br></div><div>Abayiz<br></div> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"> <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<font face="Arial" size="2"><div class="yiv49744394im"> <hr size="1"> <b><span style="font-weight: bold;">From:</span></b> David Doria <<a rel="nofollow" ymailto="mailto:daviddoria@gmail.com" target="_blank" href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>><br> </div>
<b><span style="font-weight: bold;">To:</span></b> Abayiz <<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>> <br><b><span style="font-weight: bold;">Cc:</span></b> itk <<a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a>> <br>
<b><span style="font-weight: bold;">Sent:</span></b> Sunday, November 20, 2011 8:24 PM<div class="yiv49744394im"><br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] Cmake Linking Object Error: undefined reference<br>
</div></font><div class="yiv49744394im"> <br>
On Sun, Nov 20, 2011 at 1:20 PM, Abayiz <<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>> wrote:<br>> Hello Cagatay,<br>> Thank you very much for your answer.<br>> I am using ITK4, so tried as you said, changing the link libraries line in<br>
> CMake. But it didn't work, still giving the same error.<br>> And, I've defined "SetThirdAdvectionFunction" in<br>> "VavBoneSegmentationLevelSetImageFilter.h" clearly, I am sure this is not<br>
> the error point.<br>><br>> Are there any other suggestions?<br>><br>> Thanks,<br>> Abayiz<br><br>I suggest you make the smallest possible compilable example of your<br>problem so we can try to reproduce the error. I agree with Cagatay<br>
that SetThirdAdvectionFunction is either not defined, or the file it<br>is defined in is not compiled. You said you defined it in<br>VavBoneSegmentationLevelSetImageFilter.h - are you sure
the<br>implementation (definition) is there, and not just the declaration?<br><br>David<br><br><br> </div></div> </div> </div></div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
http://www.kitware.com/opensource/opensource.html<br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
http://www.kitware.com/products/protraining.html<br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
http://www.itk.org/Wiki/ITK_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.itk.org/mailman/listinfo/insight-users<br>
<br></blockquote></div><br></div></div></div>
</div><br><br> </div> </div> </div></body></html>