<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hello Cagatay,<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;"><span></span><div id="yiv800433375"><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><br><span></span></div><div><span>Thank you very much for your answer.</span></div><div><br><span></span></div><div><span>I am using ITK4, so tried as you said, changing the link libraries line in CMake. But it didn't work, still giving the same error.</span></div><div><span>And, I've defined "</span>SetThirdAdvectionFunction" in "VavBoneSegmentationLevelSetImageFilter.h" clearly, I am sure this is not the error point. <br></div><div><br></div><div>Are there any other
 suggestions? <br></div><div><br></div><div>Thanks,</div><div>Abayiz<br></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> David Doria &lt;daviddoria@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> akbarjan bayiz &lt;abayiz@yahoo.com&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, November 20, 2011 7:57 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Fwd: [Insight-users] Cmake Linking Object Error: undefined reference<br> </font> <br>
This was sent to the list:<br><br>David<br><br><br><br><br>---------- Forwarded message ----------<br>From: cagatay bilgin &lt;<a rel="nofollow" ymailto="mailto:bilgincc@gmail.com" target="_blank" href="mailto:bilgincc@gmail.com">bilgincc@gmail.com</a>&gt;<br>Date: Sat, Nov 19, 2011 at 10:59 PM<br>Subject: Re: [Insight-users] Cmake Linking Object Error: undefined reference<br>To: Abayiz &lt;<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>&gt;<br>Cc: "<a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a>" &lt;<a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a>&gt;<br><br><br>First, if you are using ITK4, try changing your link<br>libraries line in cmake with this one<br>target_link_libraries(Slicer ${ITK_LIBRARIES})<br>I
 remember that being a problem sometimes.<br>Basically the linker cannot find the
 function<br>SetThirdAdvectionFunction.&nbsp;Where is it defined ?<br>Do you have&nbsp;SetThirdAdvectionFunction function<br>implemented in&nbsp;VavBoneSegmentationLevelSetImageFilter.cxx?<br>Do you have it declared in your&nbsp;VavBoneSegmentationLevelSetImageFilter.h<br>file ?<br>Regards,<br>Cagatay<br><br>On Fri, Nov 18, 2011 at 3:44 AM, Abayiz &lt;<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; Hi all,<br>&gt; I am using ccmake to compile my itk code. But the compilation problem occurs while building a specific target for object file. Here is the error message from the screen:<br>&gt; *******************Scanning dependencies of target VavSegment<br>&gt; [100%] Building CXX object CMakeFiles/VavSegment.dir/VavSegment.o<br>&gt; Linking CXX executable VavSegment<br>&gt;
 CMakeFiles/VavSegment.dir/VavSegment.o:(.rodata._ZTVN3itk38VavBoneSegmentationLevelSetImageFilterINS_5ImageIfLj3EEES2_fEE[vtable for itk::VavBoneSegmentationLevelSetImageFilter&lt;itk::Image&lt;float, 3u&gt;, itk::Image&lt;float, 3u&gt;, float&gt;]+0x458): undefined reference to `itk::VavBoneSegmentationLevelSetImageFilter&lt;itk::Image&lt;float, 3u&gt;, itk::Image&lt;float, 3u&gt;, float&gt;::SetThirdAdvectionFunction(itk::Image&lt;itk::FixedArray&lt;float, 3u&gt;, 3u&gt;*)'<br>&gt; collect2: ld returned 1 exit status<br>&gt; make[2]: *** [VavSegment] Error 1<br>&gt; make[1]: *** [CMakeFiles/VavSegment.dir/all] Error 2<br>&gt; make: *** [all] Error 2<br>&gt; ********************<br>&gt; My CMakeLists is as follows:<br>&gt; ****************<br>&gt; cmake_minimum_required(VERSION 2.4)<br>&gt;<br>&gt; PROJECT( VavSegment )<br>&gt;<br>&gt; FIND_PACKAGE(ITK)<br>&gt; &nbsp; IF(ITK_FOUND)<br>&gt; &nbsp;&nbsp;&nbsp; INCLUDE(${ITK_USE_FILE})<br>&gt;
 ENDIF(ITK_FOUND)<br>&gt;<br>&gt; SET(CMAKE_BUILD_TYPE "Release")<br>&gt;<br>&gt; ADD_EXECUTABLE( VavSegment VavSegment.cxx<br>&gt; VavBoneSegmentationLevelSetFunction.h<br>&gt; VavBoneSegmentationLevelSetFunction.txx<br>&gt; VavBoneSegmentationLevelSetImageFilter.h<br>&gt; VavBoneSegmentationLevelSetImageFilter.txx<br>&gt; &nbsp;)<br>&gt;<br>&gt; TARGET_LINK_LIBRARIES( VavSegment<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITKIO ITKCommon ITKBasicFilters ITKStatistics ITKAlgorithms<br>&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; )<br>&gt; ***************************<br>&gt; What could be the problem? Many thanks in advance!<br>&gt; Regards,<br>&gt; Abayiz<br>&gt; _____________________________________<br>&gt; Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt;
 http://www.kitware.com/opensource/opensource.html<br>&gt;<br>&gt; Kitware offers ITK Training Courses, for more information visit:<br>&gt; http://www.kitware.com/products/protraining.html<br>&gt;<br>&gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; http://www.itk.org/Wiki/ITK_FAQ<br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.itk.org/mailman/listinfo/insight-users<br>&gt;<br><br><br>_____________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at<br><a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a rel="nofollow" target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><br><br>Please keep messages on-topic and check
 the ITK FAQ at:<br><a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br><br><br> </div> </div>  </div></div></div><br><br> </div> </div>  </div></body></html>