<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 <daviddoria@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> akbarjan bayiz <abayiz@yahoo.com> <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 <<a rel="nofollow" ymailto="mailto:bilgincc@gmail.com" target="_blank" href="mailto:bilgincc@gmail.com">bilgincc@gmail.com</a>><br>Date: Sat, Nov 19, 2011 at 10:59 PM<br>Subject: Re: [Insight-users] Cmake Linking Object Error: undefined reference<br>To: Abayiz <<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>><br>Cc: "<a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a>" <<a rel="nofollow" ymailto="mailto:insight-users@itk.org" target="_blank" href="mailto:insight-users@itk.org">insight-users@itk.org</a>><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. Where is it defined ?<br>Do you have SetThirdAdvectionFunction function<br>implemented in VavBoneSegmentationLevelSetImageFilter.cxx?<br>Do you have it declared in your VavBoneSegmentationLevelSetImageFilter.h<br>file ?<br>Regards,<br>Cagatay<br><br>On Fri, Nov 18, 2011 at 3:44 AM, Abayiz <<a rel="nofollow" ymailto="mailto:abayiz@yahoo.com" target="_blank" href="mailto:abayiz@yahoo.com">abayiz@yahoo.com</a>> wrote:<br>><br>> Hi all,<br>> 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>> *******************Scanning dependencies of target VavSegment<br>> [100%] Building CXX object CMakeFiles/VavSegment.dir/VavSegment.o<br>> Linking CXX executable VavSegment<br>>
CMakeFiles/VavSegment.dir/VavSegment.o:(.rodata._ZTVN3itk38VavBoneSegmentationLevelSetImageFilterINS_5ImageIfLj3EEES2_fEE[vtable for itk::VavBoneSegmentationLevelSetImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>, float>]+0x458): undefined reference to `itk::VavBoneSegmentationLevelSetImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>, float>::SetThirdAdvectionFunction(itk::Image<itk::FixedArray<float, 3u>, 3u>*)'<br>> collect2: ld returned 1 exit status<br>> make[2]: *** [VavSegment] Error 1<br>> make[1]: *** [CMakeFiles/VavSegment.dir/all] Error 2<br>> make: *** [all] Error 2<br>> ********************<br>> My CMakeLists is as follows:<br>> ****************<br>> cmake_minimum_required(VERSION 2.4)<br>><br>> PROJECT( VavSegment )<br>><br>> FIND_PACKAGE(ITK)<br>> IF(ITK_FOUND)<br>> INCLUDE(${ITK_USE_FILE})<br>>
ENDIF(ITK_FOUND)<br>><br>> SET(CMAKE_BUILD_TYPE "Release")<br>><br>> ADD_EXECUTABLE( VavSegment VavSegment.cxx<br>> VavBoneSegmentationLevelSetFunction.h<br>> VavBoneSegmentationLevelSetFunction.txx<br>> VavBoneSegmentationLevelSetImageFilter.h<br>> VavBoneSegmentationLevelSetImageFilter.txx<br>> )<br>><br>> TARGET_LINK_LIBRARIES( VavSegment<br>> ITKIO ITKCommon ITKBasicFilters ITKStatistics ITKAlgorithms<br>> )<br>> ***************************<br>> What could be the problem? Many thanks in advance!<br>> Regards,<br>> Abayiz<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><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>