[Insight-users] Watershed 3D example strange Error
Ella Maria Kadas
ella_kadas at yahoo.com
Fri Mar 25 11:02:08 EDT 2011
HiIs there some other way to write the CMakeLists.txt, or to include headers from the Review Folder. I deleted everything that i ever installed or configured with cmake from the mac, and started all over again just to be sure. Downloaded ITK3.20, configured with cmake and using ITK_USE_REVIEW ON, Debug and Run the project with Xcode. And tried the 2d example for Watershed Segmentation again.The same errormy CMakeLists.txt is:
cmake_minimum_required(VERSION 2.6)PROJECT(Watershed)FIND_PACKAGE(ITK REQUIRED)INCLUDE(${ITK_USE_FILE})ADD_EXECUTABLE(WatershedSegmentation1 WatershedSegmentation1.cxx)TARGET_LINK_LIBRARIES(WatershedSegmentation1 ITKReview ${ITK_LIBRARIES})
--- David Doria <daviddoria at gmail.com> schrieb am Fr, 25.3.2011:
Von: David Doria <daviddoria at gmail.com>
Betreff: Re: [Insight-users] Watershed 3D example strange Error
An: "Ella Maria Kadas" <ella_kadas at yahoo.com>, "ITK" <insight-users at itk.org>
Datum: Freitag, 25. März, 2011 13:44 Uhr
On Thu, Mar 24, 2011 at 11:58 PM, Ella Maria Kadas <ella_kadas at yahoo.com> wrote:
Hi,
Thank u for the explanation. Because Watershed Segmentation is not in the Review Folder, i used
TARGET_LINK_LIBRARIES(........... ITKCommon ITKIO)Although i configured ITK3.20 with CMake using Use_Review on i still get this error when trying to run the project
ld: library not found for -lITKReview
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.2 failed with exit code 1 The same happens when i try to run a project in Visual Studio 9 2008.
Any idea how i could fix that?Thanks,
Ella Please keep the discussion on the mailing list.
Your link line should look exactly like:That is, replace everything except ITKReview with ${ITK_LIBRARIES}
target_link_libraries(DeepCopy ITKReview ${ITK_LIBRARIES})
ld: library not found for -lITKReview
definitely means that you built ITK without USE_REVIEW on. Either that or you're linking against a different version of ITK than the one you are building.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110325/6081aded/attachment.htm>
More information about the Insight-users
mailing list