<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi<div>Is there some other way to write the CMakeLists.txt, or to include headers from the Review Folder.</div><div>&nbsp;&nbsp; &nbsp;I deleted everything that i ever installed or configured with cmake from the mac, and started all over again just to be sure.</div><div>&nbsp;&nbsp; Downloaded ITK3.20, configured with cmake and using ITK_USE_REVIEW ON, Debug and Run the project with Xcode.</div><div>&nbsp;&nbsp; And tried the 2d example for Watershed Segmentation again.</div><div>The same error</div><div>my CMakeLists.txt is:</div><div><br></div><div><div>cmake_minimum_required(VERSION 2.6)</div><div>PROJECT(Watershed)</div><div>FIND_PACKAGE(ITK REQUIRED)</div><div>INCLUDE(${ITK_USE_FILE})</div><div>ADD_EXECUTABLE(WatershedSegmentation1 WatershedSegmentation1.cxx)</div><div>TARGET_LINK_LIBRARIES(WatershedSegmentation1 ITKReview
 ${ITK_LIBRARIES})</div></div><div><br><br>--- David Doria <i>&lt;daviddoria@gmail.com&gt;</i> schrieb am <b>Fr, 25.3.2011:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>Von: David Doria &lt;daviddoria@gmail.com&gt;<br>Betreff: Re: [Insight-users] Watershed 3D example strange Error<br>An: "Ella Maria Kadas" &lt;ella_kadas@yahoo.com&gt;, "ITK" &lt;insight-users@itk.org&gt;<br>Datum: Freitag, 25. März, 2011 13:44 Uhr<br><br><div id="yiv1867602231"><div class="yiv1867602231gmail_quote">On Thu, Mar 24, 2011 at 11:58 PM, Ella Maria Kadas <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:ella_kadas@yahoo.com" target="_blank" href="/mc/compose?to=ella_kadas@yahoo.com">ella_kadas@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="yiv1867602231gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit;">Hi,<div><br></div><div>&nbsp;Thank u for the explanation. Because Watershed Segmentation is not in the Review Folder, i used&nbsp;</div>
<div>TARGET_LINK_LIBRARIES(........... ITKCommon ITKIO)</div><div>Although i configured ITK3.20 with CMake using Use_Review on i still get this error when trying to run the project&nbsp;</div><div><p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">
ld: library not found for -lITKReview</p><div class="yiv1867602231im">
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">collect2: ld returned 1 exit status</p>
</div><p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">Command /Developer/usr/bin/g++-4.2 failed with exit code 1</p><p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">&nbsp;&nbsp;The same happens when i try to run a project in Visual Studio 9 2008.</p>
<p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">Any idea how i could fix that?</p><p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">Thanks,</p><p style="margin:0.0px 0.0px 0.0px 12.0px;font:11.0px Menlo;">
&nbsp;&nbsp; Ella</p></div></td></tr></tbody></table></blockquote><div>&nbsp;</div></div>Please keep the discussion on the mailing list.<div><br></div><div>Your link line should look exactly like:</div><div>That is, replace everything except ITKReview with&nbsp;<span class="yiv1867602231Apple-style-span" style="color:rgb(176, 128, 0);font-family:monospace;font-size:10px;line-height:12px;white-space:pre;">${ITK_LIBRARIES}</span></div>
<div><span class="yiv1867602231Apple-style-span" style="color:rgb(176, 128, 0);font-family:monospace;font-size:10px;line-height:12px;white-space:pre;"><br></span></div><div><span class="yiv1867602231Apple-style-span" style="font-family:monospace;font-size:10px;"><pre class="yiv1867602231de1" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:white;border-right-color:white;border-bottom-color:white;border-left-color:white;color:black;background-color:initial;line-height:normal;font:normal normal normal 1em/1.2em monospace;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-image:none;vertical-align:top;"><span class="yiv1867602231kw1" style="color:rgb(31, 63, 129);">target_link_libraries</span><span
 class="yiv1867602231sy0" style="color:rgb(25, 125, 139);">(</span>DeepCopy ITKReview <span class="yiv1867602231re0" style="color:rgb(176, 128, 0);">${ITK_LIBRARIES}</span><span class="yiv1867602231sy0" style="color:rgb(25, 125, 139);">)</span></pre>
<pre class="yiv1867602231de1" style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:white;border-right-color:white;border-bottom-color:white;border-left-color:white;background-color:initial;line-height:normal;font:normal normal normal 1em/1.2em monospace;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-image:none;vertical-align:top;"><font class="yiv1867602231Apple-style-span" color="#197D8B"><br></font></pre><pre class="yiv1867602231de1"
 style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:white;border-right-color:white;border-bottom-color:white;border-left-color:white;background-color:initial;line-height:normal;font:normal normal normal 1em/1.2em monospace;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-image:none;vertical-align:top;"><font class="yiv1867602231Apple-style-span" color="#197D8B"><br></font></pre><pre class="yiv1867602231de1"
 style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:white;border-right-color:white;border-bottom-color:white;border-left-color:white;background-color:initial;line-height:normal;font:normal normal normal 1em/1.2em monospace;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-image:none;vertical-align:top;"><font class="yiv1867602231Apple-style-span" color="#197D8B"><br></font></pre><pre class="yiv1867602231de1"
 style="padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-top-color:white;border-right-color:white;border-bottom-color:white;border-left-color:white;background-color:initial;line-height:normal;font:normal normal normal 1em/1.2em monospace;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-image:none;vertical-align:top;"><font class="yiv1867602231Apple-style-span" color="#197D8B"><span class="yiv1867602231Apple-style-span" style="font-family:Menlo;font-size:11px;color:rgb(0, 0, 0);line-height:normal;white-space:normal;">ld: library not found for -lITKReview</span></font></pre>
</span><div><br></div><div>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.</div><div><br></div>David<br></div>
</div></blockquote></b></div></td></tr></table>